summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig/Library/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-02-25 14:31:55 (GMT)
committerBrad King <brad.king@kitware.com>2005-02-25 14:31:55 (GMT)
commitb40219372efc70439cd5241aabc9c4b9cd2e9adf (patch)
tree44913b0d5040674ba1e8eac8126a43d1363bd543 /Tests/ComplexOneConfig/Library/CMakeLists.txt
parentcf8fb5c6f8d9f16486d498849d86df5a025373c9 (diff)
downloadCMake-b40219372efc70439cd5241aabc9c4b9cd2e9adf.zip
CMake-b40219372efc70439cd5241aabc9c4b9cd2e9adf.tar.gz
CMake-b40219372efc70439cd5241aabc9c4b9cd2e9adf.tar.bz2
ENH: Added full pre-build/pre-link/post-build testing for both library and executable targets.
Diffstat (limited to 'Tests/ComplexOneConfig/Library/CMakeLists.txt')
-rw-r--r--Tests/ComplexOneConfig/Library/CMakeLists.txt23
1 files changed, 14 insertions, 9 deletions
diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt
index 7c58fad..1f0b0fa 100644
--- a/Tests/ComplexOneConfig/Library/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt
@@ -55,21 +55,26 @@ ENDIF(${FOO_BAR_VAR} MATCHES "BAR")
#
-# Attach a post-build custom-command to the lib.
-# It runs ${CREATE_FILE_EXE} which will create a file.
+# Attach pre-build/pre-link/post-build custom-commands to the lib.
+# Each runs ${CREATE_FILE_EXE} which will create a file.
# The 'complex' executable will then test if this file exists and remove it.
#
ADD_DEPENDENCIES(CMakeTestLibraryShared create_file)
MESSAGE("complex bin dir is ${Complex_BINARY_DIR}")
-ADD_CUSTOM_COMMAND(COMMAND ${CREATE_FILE_EXE}
- ARGS "${Complex_BINARY_DIR}/Library/postbuild.txt"
- TARGET CMakeTestLibraryShared)
-
-ADD_CUSTOM_COMMAND(COMMAND ${CMAKE_COMMAND}
+ADD_CUSTOM_COMMAND(TARGET CMakeTestLibraryShared PRE_BUILD
+ COMMAND ${CREATE_FILE_EXE}
+ ARGS "${Complex_BINARY_DIR}/Library/prebuild.txt")
+ADD_CUSTOM_COMMAND(TARGET CMakeTestLibraryShared PRE_BUILD
+ COMMAND ${CREATE_FILE_EXE}
+ ARGS "${Complex_BINARY_DIR}/Library/prelink.txt")
+ADD_CUSTOM_COMMAND(TARGET CMakeTestLibraryShared POST_BUILD
+ COMMAND ${CREATE_FILE_EXE}
+ ARGS "${Complex_BINARY_DIR}/Library/postbuild.txt")
+ADD_CUSTOM_COMMAND(TARGET CMakeTestLibraryShared POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
ARGS -E copy
"${Complex_BINARY_DIR}/Library/postbuild.txt"
- "${Complex_BINARY_DIR}/Library/postbuild2.txt"
- TARGET CMakeTestLibraryShared)
+ "${Complex_BINARY_DIR}/Library/postbuild2.txt")
#
# Add a custom target.