summaryrefslogtreecommitdiffstats
path: root/Tests
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
parent729bc4cb6d4b7b0834a6e31aa36fa431f5ab0518 (diff)
downloadCMake-0f19623edd23e0cbb4ccfe61d33fc2e72e733958.zip
CMake-0f19623edd23e0cbb4ccfe61d33fc2e72e733958.tar.gz
CMake-0f19623edd23e0cbb4ccfe61d33fc2e72e733958.tar.bz2
BUG: fixes for hp
Diffstat (limited to 'Tests')
-rw-r--r--Tests/LoadCommand/CMakeLists.txt11
-rw-r--r--Tests/LoadCommandOneConfig/CMakeLists.txt11
2 files changed, 18 insertions, 4 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)
diff --git a/Tests/LoadCommandOneConfig/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeLists.txt
index 24f9859..c6706f9 100644
--- a/Tests/LoadCommandOneConfig/CMakeLists.txt
+++ b/Tests/LoadCommandOneConfig/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)