2

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/)
Adam
  • 1,724
  • 4
  • 21
  • 31
  • I would try `PROJECT_SOURCE_DIR` or `CMAKE_SOURCE_DIR` instead of `CMAKE_CURRENT_SOURCE_DIR`. The latter changes in a subdirectory. – Victor Sergienko Jul 10 '18 at 22:31
  • https://stackoverflow.com/questions/46245738/in-clion-header-only-library-file-does-not-belong-to-any-project-target-code – lineil Sep 12 '18 at 20:46

1 Answers1

1

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)

Adam
  • 1,724
  • 4
  • 21
  • 31