From eab24670e3e2a8b2a7469ba418e183c363ff27d1 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Wed, 18 Sep 2002 11:38:15 -0400 Subject: test passing CMAKE_FLAGS --- Tests/LoadCommand/CMakeCommands/CMakeLists.txt | 4 ++++ Tests/LoadCommand/CMakeCommands/cmTestCommand.c | 2 ++ Tests/LoadCommand/CMakeLists.txt | 2 +- Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt | 4 ++++ Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c | 2 ++ Tests/LoadCommandOneConfig/CMakeLists.txt | 2 +- 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Tests/LoadCommand/CMakeCommands/CMakeLists.txt b/Tests/LoadCommand/CMakeCommands/CMakeLists.txt index 3a019aa..4c45349 100644 --- a/Tests/LoadCommand/CMakeCommands/CMakeLists.txt +++ b/Tests/LoadCommand/CMakeCommands/CMakeLists.txt @@ -1,4 +1,8 @@ PROJECT(CMAKE_LOADED_COMMANDS) +IF (MUDSLIDE_TYPE MATCHES MUCHO) + ADD_DEFINITIONS(-DMUCHO_MUDSLIDE) +ENDIF (MUDSLIDE_TYPE MATCHES MUCHO) + INCLUDE_DIRECTORIES(${CMAKE_ROOT}/include ${CMAKE_ROOT}/Source) ADD_LIBRARY(cmCMAKE_TEST_COMMAND SHARED cmTestCommand.c) diff --git a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c index f1e1f21..ecdffc0 100644 --- a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c +++ b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c @@ -59,6 +59,7 @@ CM_PLUGIN_EXPORT const char *cmGetName() return "CMAKE_TEST_COMMAND"; } +#ifdef MUCHO_MUDSLIDE void CM_PLUGIN_EXPORT cmInitializeCommand(cmLoadedCommandInfo *info) { info->InitialPass = InitialPass; @@ -66,6 +67,7 @@ void CM_PLUGIN_EXPORT cmInitializeCommand(cmLoadedCommandInfo *info) info->Destructor = Destructor; info->m_Inherited = 0; } +#endif diff --git a/Tests/LoadCommand/CMakeLists.txt b/Tests/LoadCommand/CMakeLists.txt index 987ac32..793589a 100644 --- a/Tests/LoadCommand/CMakeLists.txt +++ b/Tests/LoadCommand/CMakeLists.txt @@ -7,7 +7,7 @@ SET (TEST_COMMAND_TEST1 1) TRY_COMPILE(COMPILE_OK ${LoadedCommand_BINARY_DIR}/CMakeCommands ${LoadedCommand_SOURCE_DIR}/CMakeCommands - CMAKE_LOADED_COMMANDS) + CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO) # if the compile was OK, try loading the command IF (COMPILE_OK) diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt index 3a019aa..4c45349 100644 --- a/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt +++ b/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt @@ -1,4 +1,8 @@ PROJECT(CMAKE_LOADED_COMMANDS) +IF (MUDSLIDE_TYPE MATCHES MUCHO) + ADD_DEFINITIONS(-DMUCHO_MUDSLIDE) +ENDIF (MUDSLIDE_TYPE MATCHES MUCHO) + INCLUDE_DIRECTORIES(${CMAKE_ROOT}/include ${CMAKE_ROOT}/Source) ADD_LIBRARY(cmCMAKE_TEST_COMMAND SHARED cmTestCommand.c) diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c index f1e1f21..ecdffc0 100644 --- a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c +++ b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c @@ -59,6 +59,7 @@ CM_PLUGIN_EXPORT const char *cmGetName() return "CMAKE_TEST_COMMAND"; } +#ifdef MUCHO_MUDSLIDE void CM_PLUGIN_EXPORT cmInitializeCommand(cmLoadedCommandInfo *info) { info->InitialPass = InitialPass; @@ -66,6 +67,7 @@ void CM_PLUGIN_EXPORT cmInitializeCommand(cmLoadedCommandInfo *info) info->Destructor = Destructor; info->m_Inherited = 0; } +#endif diff --git a/Tests/LoadCommandOneConfig/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeLists.txt index 987ac32..793589a 100644 --- a/Tests/LoadCommandOneConfig/CMakeLists.txt +++ b/Tests/LoadCommandOneConfig/CMakeLists.txt @@ -7,7 +7,7 @@ SET (TEST_COMMAND_TEST1 1) TRY_COMPILE(COMPILE_OK ${LoadedCommand_BINARY_DIR}/CMakeCommands ${LoadedCommand_SOURCE_DIR}/CMakeCommands - CMAKE_LOADED_COMMANDS) + CMAKE_LOADED_COMMANDS CMAKE_FLAGS -DMUDSLIDE_TYPE:STRING=MUCHO) # if the compile was OK, try loading the command IF (COMPILE_OK) -- cgit v0.12