CMake: add assembly directory to include path

I am looking for a good way to add the assembly directory (which is different from my source directory, the git repository) in the include path for gcc so that it has the classic config.h file for portability observed during compilation.

+6
source share
4 answers

I was looking for

include_directories (${CMAKE_BINARY_DIR})

To add an assembly directory in case of assembly outside the source.

+11
source

Are you looking for this -I $ (DIR)?

+2
source

${CMAKE_CURRENT_BINARY_DIR} , .

, src/ , src/CMakeLists.txt ${CMAKE_CURRENT_BINARY_DIR} , .

0

, ,

set(CMAKE_INCLUDE_CURRENT_DIR ON)

CMAKE_INCLUDE_CURRENT_DIR - automatically add current sources and create directories in the inclusion path.

0
source

All Articles