summaryrefslogtreecommitdiffstats
path: root/Tests/Complex/Library
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-02 15:14:00 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-02 15:14:00 (GMT)
commit1d9f287af758b4a9cf8c35463ce98af1169cccf6 (patch)
tree6b437cb7c5e9de4ae2ea2d7c357095a2026b0e9a /Tests/Complex/Library
parent603b47c87a6b7bbf99dfd13e4b874ee51e528434 (diff)
downloadCMake-1d9f287af758b4a9cf8c35463ce98af1169cccf6.zip
CMake-1d9f287af758b4a9cf8c35463ce98af1169cccf6.tar.gz
CMake-1d9f287af758b4a9cf8c35463ce98af1169cccf6.tar.bz2
ENH: Added NOT_IN_ALL option for ADD_LIBRARY and ADD_EXECUTABLE to avoid building the targets by default.
Diffstat (limited to 'Tests/Complex/Library')
-rw-r--r--Tests/Complex/Library/CMakeLists.txt3
-rw-r--r--Tests/Complex/Library/notInAllLib.cxx5
2 files changed, 8 insertions, 0 deletions
diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt
index 55d6ddb..d07bf48 100644
--- a/Tests/Complex/Library/CMakeLists.txt
+++ b/Tests/Complex/Library/CMakeLists.txt
@@ -103,6 +103,9 @@ SET_SOURCE_FILES_PROPERTIES(file2 PROPERTIES ABSTRACT 1)
INSTALL_FILES(/tmp .h ${Complex_BINARY_DIR}/cmTestConfigure.h)
INSTALL_FILES(/tmp .cxx ${Complex_BINARY_DIR}/cmTestConfigure.h)
+# Test creating a library that is not built by default.
+ADD_LIBRARY(notInAllLib NOT_IN_ALL notInAllLib.cxx)
+
# Test generation of preprocessed sources.
IF("${CMAKE_GENERATOR}" MATCHES "Makefile" AND CMAKE_MAKE_PROGRAM)
IF(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE)
diff --git a/Tests/Complex/Library/notInAllLib.cxx b/Tests/Complex/Library/notInAllLib.cxx
new file mode 100644
index 0000000..5d928f4
--- /dev/null
+++ b/Tests/Complex/Library/notInAllLib.cxx
@@ -0,0 +1,5 @@
+int notInAllLibFunc() { return 0; }
+
+#if 1
+# error "This target should not be compiled by ALL."
+#endif