Ninja: Absolute path to include directory becomes relative in a compiler command line
cmake 3.20.3
Main (root) CMakeLists.txt
SET(VENDOR_DIR ${CMAKE_SOURCE_DIR}/vendor) INCLUDE_DIRECTORIES(${VENDOR_DIR}/include)
For target defined in sub-folder added with add_subdirectory() compiler command line has this
-I../vendor/include
This is in-source build inside a sub-folder of root source folder message(STATUS ${VENDOR_DIR}/include) prints full path
Using Ninja generator.
Why absolute path becomes relative in the compiler command line? How to control this behavior?
Edited by Brad King