summaryrefslogtreecommitdiffstats
path: root/Tests/LoadCommand/CMakeLists.txt
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-03-11 20:25:50 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-03-11 20:25:50 (GMT)
commit0f19623edd23e0cbb4ccfe61d33fc2e72e733958 (patch)
treee94a712b9f2e71fd07e1a39ed7a7ace38a56fa31 /Tests/LoadCommand/CMakeLists.txt
parent729bc4cb6d4b7b0834a6e31aa36fa431f5ab0518 (diff)
downloadCMake-0f19623edd23e0cbb4ccfe61d33fc2e72e733958.zip
CMake-0f19623edd23e0cbb4ccfe61d33fc2e72e733958.tar.gz
CMake-0f19623edd23e0cbb4ccfe61d33fc2e72e733958.tar.bz2
BUG: fixes for hp
Diffstat (limited to 'Tests/LoadCommand/CMakeLists.txt')
-rw-r--r--Tests/LoadCommand/CMakeLists.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/Tests/LoadCommand/CMakeLists.txt b/Tests/LoadCommand/CMakeLists.txt
index 24f9859..c6706f9 100644
--- a/Tests/LoadCommand/CMakeLists.txt
+++ b/Tests/LoadCommand/CMakeLists.txt
@@ -22,10 +22,17 @@ CONFIGURE_FILE(${LoadedCommand_SOURCE_DIR}/LoadedCommand.h.in
INCLUDE_DIRECTORIES(${LoadedCommand_BINARY_DIR})
# try to compile the command
-TRY_COMPILE(COMPILE_OK
+# make sure it is not already loaded
+IF(COMMAND CMAKE_TEST_COMMAND)
+ELSE(COMMAND CMAKE_TEST_COMMAND)
+ TRY_COMPILE(COMPILE_OK
${LoadedCommand_BINARY_DIR}/CMakeCommands
${LoadedCommand_SOURCE_DIR}/CMakeCommands
- CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO)
+ CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO
+ OUTPUT_VARIABLE OUTPUT )
+ENDIF(COMMAND CMAKE_TEST_COMMAND)
+
+MESSAGE("Output from try compile: ${OUTPUT}")
# if the compile was OK, try loading the command
IF (COMPILE_OK)