summaryrefslogtreecommitdiffstats
path: root/Tests/IncludeDirectories
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2011-06-02 14:28:10 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2011-06-02 14:28:10 (GMT)
commit7815e90e21049cb06ecbdbe8ed44aa008aa9d6f4 (patch)
treec326e90b7c2563285951f39e0f26909b15e87b14 /Tests/IncludeDirectories
parent5764739f52095d6be5bb8d105335c58974ee40ec (diff)
downloadCMake-7815e90e21049cb06ecbdbe8ed44aa008aa9d6f4.zip
CMake-7815e90e21049cb06ecbdbe8ed44aa008aa9d6f4.tar.gz
CMake-7815e90e21049cb06ecbdbe8ed44aa008aa9d6f4.tar.bz2
Fix for bug#10798. VS10 did not append -I flags with COMPILE_FLAGS prop.
This fix adds a test for this case for all generators.
Diffstat (limited to 'Tests/IncludeDirectories')
-rw-r--r--Tests/IncludeDirectories/CMakeLists.txt10
-rw-r--r--Tests/IncludeDirectories/Flags/Flags.h1
-rw-r--r--Tests/IncludeDirectories/IncDir/IncDir.h1
-rw-r--r--Tests/IncludeDirectories/SrcProp/SrcProp.h1
-rw-r--r--Tests/IncludeDirectories/TarProp/TarProp.h1
-rw-r--r--Tests/IncludeDirectories/main.cpp9
6 files changed, 23 insertions, 0 deletions
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt
new file mode 100644
index 0000000..af2a2b7
--- /dev/null
+++ b/Tests/IncludeDirectories/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required (VERSION 2.6)
+project(IncludeDirectories)
+
+set(CMAKE_CXX_FLAGS "\"-I${CMAKE_SOURCE_DIR}/Flags\"")
+include_directories(${CMAKE_SOURCE_DIR}/IncDir)
+set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS
+ "\"-I${CMAKE_SOURCE_DIR}/SrcProp\"")
+add_executable(IncludeDirectories main.cpp)
+set_target_properties(IncludeDirectories
+ PROPERTIES COMPILE_FLAGS "\"-I${CMAKE_SOURCE_DIR}/TarProp\"")
diff --git a/Tests/IncludeDirectories/Flags/Flags.h b/Tests/IncludeDirectories/Flags/Flags.h
new file mode 100644
index 0000000..0397515
--- /dev/null
+++ b/Tests/IncludeDirectories/Flags/Flags.h
@@ -0,0 +1 @@
+// include Flags.h
diff --git a/Tests/IncludeDirectories/IncDir/IncDir.h b/Tests/IncludeDirectories/IncDir/IncDir.h
new file mode 100644
index 0000000..7c0ca96
--- /dev/null
+++ b/Tests/IncludeDirectories/IncDir/IncDir.h
@@ -0,0 +1 @@
+// include IncDir.h
diff --git a/Tests/IncludeDirectories/SrcProp/SrcProp.h b/Tests/IncludeDirectories/SrcProp/SrcProp.h
new file mode 100644
index 0000000..18b42cc
--- /dev/null
+++ b/Tests/IncludeDirectories/SrcProp/SrcProp.h
@@ -0,0 +1 @@
+// include SrcProp.h
diff --git a/Tests/IncludeDirectories/TarProp/TarProp.h b/Tests/IncludeDirectories/TarProp/TarProp.h
new file mode 100644
index 0000000..59326f6
--- /dev/null
+++ b/Tests/IncludeDirectories/TarProp/TarProp.h
@@ -0,0 +1 @@
+// include TarProp.h
diff --git a/Tests/IncludeDirectories/main.cpp b/Tests/IncludeDirectories/main.cpp
new file mode 100644
index 0000000..a59d27c
--- /dev/null
+++ b/Tests/IncludeDirectories/main.cpp
@@ -0,0 +1,9 @@
+#include "Flags.h"
+#include "IncDir.h"
+#include "SrcProp.h"
+#include "TarProp.h"
+
+int main(int argc, char** argv)
+{
+ return 0;
+}