gtest TEST highlighted by clion parser.


(this is a my first day migration to clion+mingw.from qt creator+vc,

so probably that is not an issue, but my inattention or misunderstanding)

simple TEST:

TEST(InsertSort, IsOutputSorted) {
std::forward_list<double> fl;
std::generate_n(std::front_inserter(fl), 10, std::rand);
classic_algorithms::InsertSort(fl.begin(), fl.end());
ASSERT_TRUE(std::is_sorted(fl.begin(), fl.end()));

it's compiled and ran successfully.
but clion shows me ASSERT_TRUE with red highlighting.
Sorry, I even don't see the ability to copy this message in clion.

this is something like :
AssertionResult doesn't have AssertionResult(bool) constructor.

That is a template , please look at second constructor of this class.
for me looks valid, and compiler works without warnings/errors.

Comment actions Permalink

(by the way),

regarding cmake setting, tried to specify build output path with two options

1. thou that root build folder should there and cmake (or clion?) added subfolder with project name - no

2. tried to use something like ../build/${CMAKE_PROJECT_NAME} - not translated to project name for subfolder


how to set this up?

Comment actions Permalink

For your first question: this is a known issue:

Comment actions Permalink

Hi Ernst.

Do you mean something like changing build output path in your second question?

Currently it is not possible to override the CMake output directory. We have the issue in our tracker. Feel free to comment or upvote.

Will changing IDE's system path be a suitable workaround for you?


Comment actions Permalink

Hi Anna


I mean :
File | Settings | Build,Execution,Deployment | Cmake:

Build: Build Output path.

I was trying to use cmake variable there for a desired path.

but seems that IDE doesn't extract cmake variable

Comment actions Permalink

but please do not spend your time on my question

we decided do not migrate to clion at the moment...

until this will support windows native toolchain (vc)

hope this will implemented in a future ( I saw a request in your tracker)


thank you for a perfect dev tool in any case!


Please sign in to leave a comment.