From ad748ce26e61f19ab46308dff4cb614b839fcc1c Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Fri, 21 Jul 2006 14:05:32 -0400 Subject: BUG: work around XCode issue --- Tests/LoadCommand/CMakeCommands/cmTestCommand.c | 2 +- Tests/LoadCommand/CMakeLists.txt | 4 +-- Tests/LoadCommand/LoadedCommand.cxx | 41 ---------------------- Tests/LoadCommand/LoadedCommand.cxx.in | 41 ++++++++++++++++++++++ .../CMakeCommands/cmTestCommand.c | 2 +- Tests/LoadCommandOneConfig/CMakeLists.txt | 4 +-- Tests/LoadCommandOneConfig/LoadedCommand.cxx | 41 ---------------------- Tests/LoadCommandOneConfig/LoadedCommand.cxx.in | 41 ++++++++++++++++++++++ 8 files changed, 88 insertions(+), 88 deletions(-) delete mode 100644 Tests/LoadCommand/LoadedCommand.cxx create mode 100644 Tests/LoadCommand/LoadedCommand.cxx.in delete mode 100644 Tests/LoadCommandOneConfig/LoadedCommand.cxx create mode 100644 Tests/LoadCommandOneConfig/LoadedCommand.cxx.in diff --git a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c index c5ee611..b1431cf 100644 --- a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c +++ b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c @@ -128,7 +128,7 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[]) ccArgs[3] = argv[1]; ccDep[0] = ccArgs[2]; ccOut[0] = ccArgs[3]; - info->CAPI->AddCustomCommand(mf, "LoadedCommand.cxx", + info->CAPI->AddCustomCommand(mf, "LoadedCommand.cxx.in", file, 4, ccArgs, 1, ccDep, diff --git a/Tests/LoadCommand/CMakeLists.txt b/Tests/LoadCommand/CMakeLists.txt index 23a52a8..30463ef 100644 --- a/Tests/LoadCommand/CMakeLists.txt +++ b/Tests/LoadCommand/CMakeLists.txt @@ -52,8 +52,8 @@ IF (COMPILE_OK) # if the command loaded, execute the command IF (COMMAND CMAKE_TEST_COMMAND) CMAKE_TEST_COMMAND( - "${LoadedCommand_SOURCE_DIR}/LoadedCommand.cxx" - "${LoadedCommand_BINARY_DIR}/LoadedCommand2.cxx" + "${LoadedCommand_SOURCE_DIR}/LoadedCommand.cxx.in" + "${LoadedCommand_BINARY_DIR}/LoadedCommand2.cxx.in" "${LoadedCommand_BINARY_DIR}/LoadedCommand3.cxx" ) ENDIF (COMMAND CMAKE_TEST_COMMAND) diff --git a/Tests/LoadCommand/LoadedCommand.cxx b/Tests/LoadCommand/LoadedCommand.cxx deleted file mode 100644 index c58bcf1..0000000 --- a/Tests/LoadCommand/LoadedCommand.cxx +++ /dev/null @@ -1,41 +0,0 @@ -#include "LoadedCommand.h" -#include - -int testSizeOf(int s1, int s2) -{ - return s1 - s2; -} - -int main () -{ - int ret = 0; -#ifdef HAVE_VSBLABLA - printf("Should not be able to find vsblabla\n"); - ret = 1; -#endif - -#if !defined( HAVE_PRINTF ) - printf("Should be able to find printf\n"); - ret= 1; -#endif - -#if !defined( ADDED_DEFINITION ) - printf("Should have ADDED_DEFINITION defined\n"); - ret= 1; -#endif -#if !defined(CMAKE_IS_FUN) - printf("Loaded Command was not built with CMAKE_IS_FUN: failed.\n"); - ret = 1; -#endif - if(testSizeOf(SIZEOF_CHAR, sizeof(char))) - { - printf("Size of char is broken.\n"); - ret = 1; - } - if(testSizeOf(SIZEOF_SHORT, sizeof(short))) - { - printf("Size of short is broken.\n"); - ret = 1; - } - return ret; -} diff --git a/Tests/LoadCommand/LoadedCommand.cxx.in b/Tests/LoadCommand/LoadedCommand.cxx.in new file mode 100644 index 0000000..c58bcf1 --- /dev/null +++ b/Tests/LoadCommand/LoadedCommand.cxx.in @@ -0,0 +1,41 @@ +#include "LoadedCommand.h" +#include + +int testSizeOf(int s1, int s2) +{ + return s1 - s2; +} + +int main () +{ + int ret = 0; +#ifdef HAVE_VSBLABLA + printf("Should not be able to find vsblabla\n"); + ret = 1; +#endif + +#if !defined( HAVE_PRINTF ) + printf("Should be able to find printf\n"); + ret= 1; +#endif + +#if !defined( ADDED_DEFINITION ) + printf("Should have ADDED_DEFINITION defined\n"); + ret= 1; +#endif +#if !defined(CMAKE_IS_FUN) + printf("Loaded Command was not built with CMAKE_IS_FUN: failed.\n"); + ret = 1; +#endif + if(testSizeOf(SIZEOF_CHAR, sizeof(char))) + { + printf("Size of char is broken.\n"); + ret = 1; + } + if(testSizeOf(SIZEOF_SHORT, sizeof(short))) + { + printf("Size of short is broken.\n"); + ret = 1; + } + return ret; +} diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c index c5ee611..b1431cf 100644 --- a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c +++ b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c @@ -128,7 +128,7 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[]) ccArgs[3] = argv[1]; ccDep[0] = ccArgs[2]; ccOut[0] = ccArgs[3]; - info->CAPI->AddCustomCommand(mf, "LoadedCommand.cxx", + info->CAPI->AddCustomCommand(mf, "LoadedCommand.cxx.in", file, 4, ccArgs, 1, ccDep, diff --git a/Tests/LoadCommandOneConfig/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeLists.txt index 23a52a8..30463ef 100644 --- a/Tests/LoadCommandOneConfig/CMakeLists.txt +++ b/Tests/LoadCommandOneConfig/CMakeLists.txt @@ -52,8 +52,8 @@ IF (COMPILE_OK) # if the command loaded, execute the command IF (COMMAND CMAKE_TEST_COMMAND) CMAKE_TEST_COMMAND( - "${LoadedCommand_SOURCE_DIR}/LoadedCommand.cxx" - "${LoadedCommand_BINARY_DIR}/LoadedCommand2.cxx" + "${LoadedCommand_SOURCE_DIR}/LoadedCommand.cxx.in" + "${LoadedCommand_BINARY_DIR}/LoadedCommand2.cxx.in" "${LoadedCommand_BINARY_DIR}/LoadedCommand3.cxx" ) ENDIF (COMMAND CMAKE_TEST_COMMAND) diff --git a/Tests/LoadCommandOneConfig/LoadedCommand.cxx b/Tests/LoadCommandOneConfig/LoadedCommand.cxx deleted file mode 100644 index c58bcf1..0000000 --- a/Tests/LoadCommandOneConfig/LoadedCommand.cxx +++ /dev/null @@ -1,41 +0,0 @@ -#include "LoadedCommand.h" -#include - -int testSizeOf(int s1, int s2) -{ - return s1 - s2; -} - -int main () -{ - int ret = 0; -#ifdef HAVE_VSBLABLA - printf("Should not be able to find vsblabla\n"); - ret = 1; -#endif - -#if !defined( HAVE_PRINTF ) - printf("Should be able to find printf\n"); - ret= 1; -#endif - -#if !defined( ADDED_DEFINITION ) - printf("Should have ADDED_DEFINITION defined\n"); - ret= 1; -#endif -#if !defined(CMAKE_IS_FUN) - printf("Loaded Command was not built with CMAKE_IS_FUN: failed.\n"); - ret = 1; -#endif - if(testSizeOf(SIZEOF_CHAR, sizeof(char))) - { - printf("Size of char is broken.\n"); - ret = 1; - } - if(testSizeOf(SIZEOF_SHORT, sizeof(short))) - { - printf("Size of short is broken.\n"); - ret = 1; - } - return ret; -} diff --git a/Tests/LoadCommandOneConfig/LoadedCommand.cxx.in b/Tests/LoadCommandOneConfig/LoadedCommand.cxx.in new file mode 100644 index 0000000..c58bcf1 --- /dev/null +++ b/Tests/LoadCommandOneConfig/LoadedCommand.cxx.in @@ -0,0 +1,41 @@ +#include "LoadedCommand.h" +#include + +int testSizeOf(int s1, int s2) +{ + return s1 - s2; +} + +int main () +{ + int ret = 0; +#ifdef HAVE_VSBLABLA + printf("Should not be able to find vsblabla\n"); + ret = 1; +#endif + +#if !defined( HAVE_PRINTF ) + printf("Should be able to find printf\n"); + ret= 1; +#endif + +#if !defined( ADDED_DEFINITION ) + printf("Should have ADDED_DEFINITION defined\n"); + ret= 1; +#endif +#if !defined(CMAKE_IS_FUN) + printf("Loaded Command was not built with CMAKE_IS_FUN: failed.\n"); + ret = 1; +#endif + if(testSizeOf(SIZEOF_CHAR, sizeof(char))) + { + printf("Size of char is broken.\n"); + ret = 1; + } + if(testSizeOf(SIZEOF_SHORT, sizeof(short))) + { + printf("Size of short is broken.\n"); + ret = 1; + } + return ret; +} -- cgit v0.12