summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-25 13:34:24 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-05-25 13:34:24 (GMT)
commit916d52533ea354d8945c0cba44f65ee34d0e7cd5 (patch)
tree542f15a19985aea192718b20c44bf04782a4140a /Tests
parent8cd007fee664e4c7d1e3a1e50dba5b3fe973e3cf (diff)
parentc13408279f035c8261b530e26040cf4b8f01fdab (diff)
downloadCMake-916d52533ea354d8945c0cba44f65ee34d0e7cd5.zip
CMake-916d52533ea354d8945c0cba44f65ee34d0e7cd5.tar.gz
CMake-916d52533ea354d8945c0cba44f65ee34d0e7cd5.tar.bz2
Merge topic 'standard-include-directories'
c1340827 Add a variable to specify language-wide system include directories 44199097 cmMakefile: Optimize AddSystemIncludeDirectories for empty set a896043b GHS: Compute include directories consistently with other generators
Diffstat (limited to 'Tests')
-rw-r--r--Tests/IncludeDirectories/CMakeLists.txt1
-rw-r--r--Tests/IncludeDirectories/StandardIncludeDirectories/CMakeLists.txt5
-rw-r--r--Tests/IncludeDirectories/StandardIncludeDirectories/StdDir/StdIncDir.h0
-rw-r--r--Tests/IncludeDirectories/StandardIncludeDirectories/main.c5
4 files changed, 11 insertions, 0 deletions
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt
index 9ee1957..523c4f7 100644
--- a/Tests/IncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/CMakeLists.txt
@@ -63,6 +63,7 @@ else()
PROPERTIES COMPILE_FLAGS "-ITarProp")
endif()
+add_subdirectory(StandardIncludeDirectories)
add_subdirectory(TargetIncludeDirectories)
set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}")
diff --git a/Tests/IncludeDirectories/StandardIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/StandardIncludeDirectories/CMakeLists.txt
new file mode 100644
index 0000000..dcbc566
--- /dev/null
+++ b/Tests/IncludeDirectories/StandardIncludeDirectories/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Normally this variable should be set by a platform information module or
+# a toolchain file, but for purposes of this test we simply set it here.
+set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/StdDir)
+
+add_executable(StandardIncludeDirectories main.c)
diff --git a/Tests/IncludeDirectories/StandardIncludeDirectories/StdDir/StdIncDir.h b/Tests/IncludeDirectories/StandardIncludeDirectories/StdDir/StdIncDir.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/IncludeDirectories/StandardIncludeDirectories/StdDir/StdIncDir.h
diff --git a/Tests/IncludeDirectories/StandardIncludeDirectories/main.c b/Tests/IncludeDirectories/StandardIncludeDirectories/main.c
new file mode 100644
index 0000000..edfe9ce
--- /dev/null
+++ b/Tests/IncludeDirectories/StandardIncludeDirectories/main.c
@@ -0,0 +1,5 @@
+#include "StdIncDir.h"
+int main()
+{
+ return 0;
+}