From a4aab3b677b01a8049cdd41bc168deed69f437fa Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 22 Jan 2004 10:51:34 -0500 Subject: ENH: Improved test to have a different relative path name for libraries between the Executable and Library directories. --- Tests/Jump/Library/CMakeLists.txt | 20 +------------------- Tests/Jump/Library/Shared/CMakeLists.txt | 18 ++++++++++++++++++ Tests/Jump/Library/Shared/jumpShared.cxx | 7 +++++++ Tests/Jump/Library/Static/CMakeLists.txt | 1 + Tests/Jump/Library/Static/jumpStatic.cxx | 1 + Tests/Jump/Library/jumpShared.cxx | 7 ------- Tests/Jump/Library/jumpStatic.cxx | 1 - 7 files changed, 28 insertions(+), 27 deletions(-) create mode 100644 Tests/Jump/Library/Shared/CMakeLists.txt create mode 100644 Tests/Jump/Library/Shared/jumpShared.cxx create mode 100644 Tests/Jump/Library/Static/CMakeLists.txt create mode 100644 Tests/Jump/Library/Static/jumpStatic.cxx delete mode 100644 Tests/Jump/Library/jumpShared.cxx delete mode 100644 Tests/Jump/Library/jumpStatic.cxx diff --git a/Tests/Jump/Library/CMakeLists.txt b/Tests/Jump/Library/CMakeLists.txt index fce9c20..9d45ea4 100644 --- a/Tests/Jump/Library/CMakeLists.txt +++ b/Tests/Jump/Library/CMakeLists.txt @@ -1,19 +1 @@ -ADD_LIBRARY(jumpStatic STATIC jumpStatic.cxx) -ADD_LIBRARY(jumpShared SHARED jumpShared.cxx) - -IF(WIN32) - SET(LIB_NAME - ${CMAKE_SHARED_LIBRARY_PREFIX}jumpShared${CMAKE_SHARED_LIBRARY_SUFFIX}) - SET(EXE_DIR ${Jump_BINARY_DIR}/Executable) - IF(EXECUTABLE_OUTPUT_PATH) - SET(EXE_DIR ${EXECUTABLE_OUTPUT_PATH}) - ENDIF(EXECUTABLE_OUTPUT_PATH) - SET(LIB_DIR ${Jump_BINARY_DIR}/Library) - IF(LIBRARY_OUTPUT_PATH) - SET(LIB_DIR ${LIBRARY_OUTPUT_PATH}) - ENDIF(LIBRARY_OUTPUT_PATH) - ADD_CUSTOM_COMMAND(TARGET jumpShared - POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy - ${LIB_DIR}/${CMAKE_CFG_INTDIR}/${LIB_NAME} - ${EXE_DIR}/${CMAKE_CFG_INTDIR}/${LIB_NAME}) -ENDIF(WIN32) +SUBDIRS(Static Shared) diff --git a/Tests/Jump/Library/Shared/CMakeLists.txt b/Tests/Jump/Library/Shared/CMakeLists.txt new file mode 100644 index 0000000..f0e09af --- /dev/null +++ b/Tests/Jump/Library/Shared/CMakeLists.txt @@ -0,0 +1,18 @@ +ADD_LIBRARY(jumpShared SHARED jumpShared.cxx) + +IF(WIN32) + SET(LIB_NAME + ${CMAKE_SHARED_LIBRARY_PREFIX}jumpShared${CMAKE_SHARED_LIBRARY_SUFFIX}) + SET(EXE_DIR ${Jump_BINARY_DIR}/Executable) + IF(EXECUTABLE_OUTPUT_PATH) + SET(EXE_DIR ${EXECUTABLE_OUTPUT_PATH}) + ENDIF(EXECUTABLE_OUTPUT_PATH) + SET(LIB_DIR ${Jump_BINARY_DIR}/Library) + IF(LIBRARY_OUTPUT_PATH) + SET(LIB_DIR ${LIBRARY_OUTPUT_PATH}) + ENDIF(LIBRARY_OUTPUT_PATH) + ADD_CUSTOM_COMMAND(TARGET jumpShared + POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy + ${LIB_DIR}/${CMAKE_CFG_INTDIR}/${LIB_NAME} + ${EXE_DIR}/${CMAKE_CFG_INTDIR}/${LIB_NAME}) +ENDIF(WIN32) diff --git a/Tests/Jump/Library/Shared/jumpShared.cxx b/Tests/Jump/Library/Shared/jumpShared.cxx new file mode 100644 index 0000000..f500058 --- /dev/null +++ b/Tests/Jump/Library/Shared/jumpShared.cxx @@ -0,0 +1,7 @@ +#ifdef _WIN32 +# define JUMP_EXPORT __declspec(dllexport) +#else +# define JUMP_EXPORT +#endif + +JUMP_EXPORT int jumpShared() { return 0; } diff --git a/Tests/Jump/Library/Static/CMakeLists.txt b/Tests/Jump/Library/Static/CMakeLists.txt new file mode 100644 index 0000000..23e70c0 --- /dev/null +++ b/Tests/Jump/Library/Static/CMakeLists.txt @@ -0,0 +1 @@ +ADD_LIBRARY(jumpStatic STATIC jumpStatic.cxx) diff --git a/Tests/Jump/Library/Static/jumpStatic.cxx b/Tests/Jump/Library/Static/jumpStatic.cxx new file mode 100644 index 0000000..1f92eb9 --- /dev/null +++ b/Tests/Jump/Library/Static/jumpStatic.cxx @@ -0,0 +1 @@ +int jumpStatic() { return 0; } diff --git a/Tests/Jump/Library/jumpShared.cxx b/Tests/Jump/Library/jumpShared.cxx deleted file mode 100644 index f500058..0000000 --- a/Tests/Jump/Library/jumpShared.cxx +++ /dev/null @@ -1,7 +0,0 @@ -#ifdef _WIN32 -# define JUMP_EXPORT __declspec(dllexport) -#else -# define JUMP_EXPORT -#endif - -JUMP_EXPORT int jumpShared() { return 0; } diff --git a/Tests/Jump/Library/jumpStatic.cxx b/Tests/Jump/Library/jumpStatic.cxx deleted file mode 100644 index 1f92eb9..0000000 --- a/Tests/Jump/Library/jumpStatic.cxx +++ /dev/null @@ -1 +0,0 @@ -int jumpStatic() { return 0; } -- cgit v0.12