ENH: Automatic include directories should not be done by default as was just implemented. Instead a project may now set CMAKE_INCLUDE_CURRENT_DIR to get this behavior. The current source and binary directories are added automatically to the beginning of the include path in every directory. This simulates in-source behavior for double-quote includes when there are generated sources and headers in the directory.

This commit is contained in:
Brad King
2006-02-19 13:10:25 -05:00
parent b6fd3b7bb1
commit 98a187a8d4
2 changed files with 28 additions and 26 deletions
@@ -1,3 +1,7 @@
# Simulate in-source build include-file behavior for out-of-source
# builds.
SET(CMAKE_INCLUDE_CURRENT_DIR 1)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated.h
COMMAND
${CMAKE_COMMAND} ARGS -E
@@ -5,6 +9,5 @@ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated.h
${CMAKE_CURRENT_BINARY_DIR}/generated.h
)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR})
ADD_LIBRARY(GeneratedHeader main.cpp)