CMake and absolute header paths

I'm trying to use CMake to build my C++ project and I have a problem in the header paths.

Since I'm using a lot of classes organized in several directories, all my include statements are with absolute paths (so no need to use "../../") but when try to make the CMake-generated Makefile it just doesn't work.

Does anyone know how to specify in CMakeLists.txt that all the includes are with absolute paths?


My output when trying to make

~/multiboost/BanditsLS/GenericBanditAlgorithmLS.h:45:25: Utils/Utils.h: No such file or directory
~/multiboost/BanditsLS/GenericBanditAlgorithmLS.h:46:35: Utils/StreamTokenizer.h: No such file or directory

My CMakeLists.txt file :

#The following command allows the use of the "file" command
cmake_minimum_required(VERSION 2.6)  

#The declaration of the project
project(multiboost)  

#This allows recursive parsing of the source files
file(
    GLOB_RECURSE
    source_files
    *
    )  
list(REMOVE_ITEM source_files ./build/* )

#This indicates the target (the executable)  
add_executable(
    multiboost
    ${source_files} #EXCLUDE_FROM_ALL build/
    )
12
задан JETM 12 June 2018 в 17:32
поделиться