diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2011-06-03 17:45:31 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2011-06-03 19:05:28 (GMT) |
commit | 2dfc121b898dcd04b3fe8ecb18d1ad8d9c4b945a (patch) | |
tree | e8fafaa94c703d3bcf5015652f5b1fc47e10a4cf /Tests/IncludeDirectories/CMakeLists.txt | |
parent | 6d29b4bfe6cffae306f0d74f1cbd3696db56d98b (diff) | |
download | CMake-2dfc121b898dcd04b3fe8ecb18d1ad8d9c4b945a.zip CMake-2dfc121b898dcd04b3fe8ecb18d1ad8d9c4b945a.tar.gz CMake-2dfc121b898dcd04b3fe8ecb18d1ad8d9c4b945a.tar.bz2 |
Use bin tree for inclues to avoid -I with spaces in the path.
Diffstat (limited to 'Tests/IncludeDirectories/CMakeLists.txt')
-rw-r--r-- | Tests/IncludeDirectories/CMakeLists.txt | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt index 8bc0f6c..87b4a95 100644 --- a/Tests/IncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/CMakeLists.txt @@ -1,10 +1,23 @@ cmake_minimum_required (VERSION 2.6) project(IncludeDirectories) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \"-I${CMAKE_SOURCE_DIR}/Flags\"") -include_directories(${CMAKE_SOURCE_DIR}/IncDir) +file(WRITE ${CMAKE_BINARY_DIR}/Flags/Flags.h +"//Flags.h +") +file(WRITE ${CMAKE_BINARY_DIR}/IncDir/IncDir.h +"//IncDir.h +") +file(WRITE ${CMAKE_BINARY_DIR}/SrcProp/SrcProp.h +"//SrcProp.h +") +file(WRITE ${CMAKE_BINARY_DIR}/TarProp/TarProp.h +"//TarProp.h +") + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -IFlags") +include_directories(${CMAKE_BINARY_DIR}/IncDir) set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS - "\"-I${CMAKE_SOURCE_DIR}/SrcProp\"") + "-ISrcProp") add_executable(IncludeDirectories main.cpp) set_target_properties(IncludeDirectories - PROPERTIES COMPILE_FLAGS "\"-I${CMAKE_SOURCE_DIR}/TarProp\"") + PROPERTIES COMPILE_FLAGS "-ITarProp") |