summaryrefslogtreecommitdiffstats
path: root/Tests/LoadCommandOneConfig/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LoadCommandOneConfig/CMakeLists.txt')
-rw-r--r--Tests/LoadCommandOneConfig/CMakeLists.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/Tests/LoadCommandOneConfig/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeLists.txt
new file mode 100644
index 0000000..a200807
--- /dev/null
+++ b/Tests/LoadCommandOneConfig/CMakeLists.txt
@@ -0,0 +1,31 @@
+PROJECT(LOADED_COMMANDS)
+
+# set a definition
+SET (TEST_COMMAND_TEST1 1)
+
+# try to compile the command
+TRY_COMPILE(COMPILE_OK
+ ${LOADED_COMMANDS_SOURCE_DIR}/CMakeCommands
+ ${LOADED_COMMANDS_BINARY_DIR}/CMakeCommands
+ CMAKE_LOADED_COMMANDS)
+
+# if the compile was OK, try loading the command
+IF (COMPILE_OK)
+ LOAD_COMMAND(CMAKE_TEST_COMMAND
+ ${LOADED_COMMANDS_BINARY_DIR}/CMakeCommands
+ ${LOADED_COMMANDS_BINARY_DIR}/CMakeCommands/Debug
+ )
+ # if the command loaded, execute the command
+ IF (COMMAND CMAKE_TEST_COMMAND)
+ CMAKE_TEST_COMMAND()
+ ENDIF (COMMAND CMAKE_TEST_COMMAND)
+ELSE (COMPILE_OK)
+ MESSAGE("failed to compile VTK_WRAP_TCL2")
+ENDIF (COMPILE_OK)
+
+IF (TEST_DEF)
+ ADD_DEFINITIONS(-DCMAKE_IS_FUN)
+ENDIF (TEST_DEF)
+
+ADD_EXECUTABLE (LoadedCommand LoadedCommand.cxx)
+