diff options
author | Brad King <brad.king@kitware.com> | 2006-02-19 18:10:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-02-19 18:10:25 (GMT) |
commit | 98a187a8d49feecc05c8eb43caeb16a7230d75a3 (patch) | |
tree | b38f21c407220de6a671921cfef9517a8292369c /Tests/CustomCommand | |
parent | b6fd3b7bb1ef208dd2b65a00fe9fe595b414cae5 (diff) | |
download | CMake-98a187a8d49feecc05c8eb43caeb16a7230d75a3.zip CMake-98a187a8d49feecc05c8eb43caeb16a7230d75a3.tar.gz CMake-98a187a8d49feecc05c8eb43caeb16a7230d75a3.tar.bz2 |
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.
Diffstat (limited to 'Tests/CustomCommand')
-rw-r--r-- | Tests/CustomCommand/GeneratedHeader/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt b/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt index 0ab333b..16d0ca4 100644 --- a/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt +++ b/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt @@ -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) |