summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-05 12:55:59 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-05 12:55:59 (GMT)
commitc11cf31c9b70b21ba171bb2682ea5304e8d00de8 (patch)
tree3d6aaf2ef210a0a725346db4b708240d06edc06f /Tests/ComplexOneConfig
parente36eb719135b8c5ce6ff317614df5e0d961718f2 (diff)
downloadCMake-c11cf31c9b70b21ba171bb2682ea5304e8d00de8.zip
CMake-c11cf31c9b70b21ba171bb2682ea5304e8d00de8.tar.gz
CMake-c11cf31c9b70b21ba171bb2682ea5304e8d00de8.tar.bz2
ENH: Adding SYSTEM option to INCLUDE_DIRECTORIES command. This addresses bug #3462.
Diffstat (limited to 'Tests/ComplexOneConfig')
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt4
-rw-r--r--Tests/ComplexOneConfig/Executable/CMakeLists.txt5
-rw-r--r--Tests/ComplexOneConfig/Executable/testSystemDir.cxx3
-rw-r--r--Tests/ComplexOneConfig/Library/testSystemDir.h2
4 files changed, 12 insertions, 2 deletions
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 3e5619f..90f4820 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -91,8 +91,8 @@ ENDIF(${fooCACHE_TEST_VAR2} MATCHES bar)
# Specify include and lib dirs
# (BEFORE is for coverage)
#
+INCLUDE_DIRECTORIES(SYSTEM Library)
INCLUDE_DIRECTORIES(
- Library
${Complex_SOURCE_DIR}/../../Source
${Complex_BINARY_DIR}/../../Source
)
@@ -101,7 +101,7 @@ INCLUDE_DIRECTORIES(BEFORE
${Complex_BINARY_DIR}
)
-INCLUDE_REGULAR_EXPRESSION("^(cmTest|file|sharedFile).*$" "^cmMissing")
+INCLUDE_REGULAR_EXPRESSION("^(cmTest|file|sharedFile|test).*$" "^cmMissing")
LINK_DIRECTORIES(
${Complex_BINARY_DIR}/Library
diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
index 11235f5..01b4b20 100644
--- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
@@ -118,6 +118,11 @@ ADD_DEPENDENCIES(notInAllCustom notInAllExe)
#
ADD_SUBDIRECTORY(Temp)
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ ADD_EXECUTABLE(testSystemDir testSystemDir.cxx)
+ SET_TARGET_PROPERTIES(testSystemDir PROPERTIES COMPILE_FLAGS "-Werror")
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
#
# Extra coverage.Not used.
#
diff --git a/Tests/ComplexOneConfig/Executable/testSystemDir.cxx b/Tests/ComplexOneConfig/Executable/testSystemDir.cxx
new file mode 100644
index 0000000..e4815c6
--- /dev/null
+++ b/Tests/ComplexOneConfig/Executable/testSystemDir.cxx
@@ -0,0 +1,3 @@
+#include <testSystemDir.h>
+
+int main() { return foo(); }
diff --git a/Tests/ComplexOneConfig/Library/testSystemDir.h b/Tests/ComplexOneConfig/Library/testSystemDir.h
new file mode 100644
index 0000000..73be353
--- /dev/null
+++ b/Tests/ComplexOneConfig/Library/testSystemDir.h
@@ -0,0 +1,2 @@
+// Purposely leave off the return type to create a warning.
+foo() { return 0; }