Adam
Adam

Reputation: 1817

CLion "This file does not belong to any project target" when added to cmake

I wanted to look at a codebase of OSRM in CLion, but code insight feature don't work. I thought only adding the file in cmake is required for CLion to provide the insights.

file is registered in cmake here

enter image description here the header files root directory is also included

include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include/)

Upvotes: 2

Views: 10461

Answers (1)

Adam
Adam

Reputation: 1817

Fixed when I resolved dependencies so that cmake run without errors. (but don't know how exactly clion uses the CMakeLists.txt file, if I knew, it could be evident)

Upvotes: 1

Related Questions