Whenever I wanted to include a directory that was located outside of my project with Clion I would use the -I somedir
flag. This time however, what I want to do
Command INCLUDE_DIRECTORIES
doesn't add any source file for compile!
Instead, this command defines directories for search header files.
You need to list all source files in add_executable()
call in any case:
include_directories(src)
set(SOURCE_FILES
src/Dijkstra/Dijkstra.cpp
src/Graph/Graph.cpp)
add_executable(someprojectname ${SOURCE_FILES})