summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexRelativePaths/CMakeLists.txt
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2002-03-29 20:02:18 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2002-03-29 20:02:18 (GMT)
commitb3647fe6d3b014dc41c9b1fb735f7a70a3e003d0 (patch)
tree5624be60404ece6954b2d6c5c3d5297a92fdd9eb /Tests/ComplexRelativePaths/CMakeLists.txt
parent2d5ddb07fd4c423303771a31326fd218bad99645 (diff)
downloadCMake-b3647fe6d3b014dc41c9b1fb735f7a70a3e003d0.zip
CMake-b3647fe6d3b014dc41c9b1fb735f7a70a3e003d0.tar.gz
CMake-b3647fe6d3b014dc41c9b1fb735f7a70a3e003d0.tar.bz2
ENH: fix tests
Diffstat (limited to 'Tests/ComplexRelativePaths/CMakeLists.txt')
-rw-r--r--Tests/ComplexRelativePaths/CMakeLists.txt59
1 files changed, 44 insertions, 15 deletions
diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt
index eaaeed9..1c317d5 100644
--- a/Tests/ComplexRelativePaths/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/CMakeLists.txt
@@ -26,14 +26,6 @@ LOAD_CACHE(${Complex_SOURCE_DIR}/Cache
CACHE_TEST_VAR_INTERNAL)
#
-# Configure file
-# (plug vars to #define so that they can be tested)
-#
-CONFIGURE_FILE(
- ${Complex_SOURCE_DIR}/cmTestConfigure.h.in
- ${Complex_BINARY_DIR}/cmTestConfigure.h)
-
-#
# Specify include and lib dirs
# (BEFORE is for coverage)
#
@@ -64,16 +56,10 @@ SET (EXECUTABLE_OUTPUT_PATH
"Single output directory for building all executables.")
#
-# Create the libs and the main exe
-#
-SUBDIRS(Library Executable)
-SUBDIR_DEPENDS(Executable Library)
-
-#
# Exec program (TODO: test a result)
# Increase coverage.
#
-MESSAGE("Trying to increase coverage...")
+MESSAGE("\nIgnore this message")
OPTION(NO_EXEC_PROGRAM "Do not test EXEC_PROGRAM" 0)
IF (NOT NO_EXEC_PROGRAM)
EXEC_PROGRAM("echo NO_EXEC_PROGRAM" "${Complex_BINARY_DIR}")
@@ -90,3 +76,46 @@ MARK_AS_ADVANCED(CLEAR NO_EXEC_PROGRAM)
# sadly it won't be able to remove it.
#
MAKE_DIRECTORY("${Complex_BINARY_DIR}/make_dir")
+
+#
+# Test FIND_LIBARY
+# Create a dummy empty lib
+#
+FOREACH (ext "${CMAKE_SHLIB_SUFFIX};.lib;.so")
+ CONFIGURE_FILE(
+ ${Complex_SOURCE_DIR}/Library/dummy
+ ${Complex_BINARY_DIR}/Library/dummylib${ext}
+ COPYONLY IMMEDIATE)
+ENDFOREACH (ext)
+
+FIND_LIBRARY(FIND_DUMMY_LIB
+ dummylib
+ PATHS
+ ${Complex_BINARY_DIR}/Library)
+
+#
+# Test SET_SOURCE_FILES_PROPERTIES
+#
+SET_SOURCE_FILES_PROPERTIES(nonexisting_file2
+ GENERATED
+ ABSTRACT
+ WRAP_EXCLUDE
+ COMPILE_FLAGS "-foo -bar")
+
+GET_SOURCE_FILE_PROPERTY(FILE_HAS_ABSTRACT nonexisting_file2 ABSTRACT)
+GET_SOURCE_FILE_PROPERTY(FILE_HAS_WRAP_EXCLUDE nonexisting_file2 WRAP_EXCLUDE)
+GET_SOURCE_FILE_PROPERTY(FILE_COMPILE_FLAGS nonexisting_file2 COMPILE_FLAGS)
+
+#
+# Configure file
+# (plug vars to #define so that they can be tested)
+#
+CONFIGURE_FILE(
+ ${Complex_SOURCE_DIR}/cmTestConfigure.h.in
+ ${Complex_BINARY_DIR}/cmTestConfigure.h)
+
+#
+# Create the libs and the main exe
+#
+SUBDIRS(Library Executable)
+SUBDIR_DEPENDS(Executable Library)