diff options
-rw-r--r-- | Tests/Complex/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/Complex/Executable/complex.cxx | 9 | ||||
-rw-r--r-- | Tests/Complex/Library/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Executable/complex.cxx | 9 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Library/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/Executable/complex.cxx | 9 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/Library/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/SimpleInstall/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tests/SimpleInstallS2/CMakeLists.txt | 9 |
11 files changed, 45 insertions, 33 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index deb0800..88acae8 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -137,13 +137,9 @@ SET(FORCE_TEST 0 CACHE STRING "a test" FORCE) # # Lib and exe path # -SET (LIBRARY_OUTPUT_PATH - ${Complex_BINARY_DIR}/bin/ CACHE INTERNAL - "Single output directory for building all libraries.") - -SET (EXECUTABLE_OUTPUT_PATH - ${Complex_BINARY_DIR}/bin/ CACHE INTERNAL - "Single output directory for building all executables.") +SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/lib/static") +SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/lib") +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/bin") MESSAGE (Test " " escape " " semi-colon " " \; \;) # diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index 1603a8c..dee36ce 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -320,12 +320,17 @@ extern "C" int NameConflictTest2(); int main() { std::string lib = BINARY_DIR; - lib += "/bin/"; + lib += "/lib/"; #ifdef CMAKE_INTDIR lib += CMAKE_INTDIR; lib += "/"; #endif - std::string exe = lib; + std::string exe = BINARY_DIR; + exe += "/bin/"; +#ifdef CMAKE_INTDIR + exe += CMAKE_INTDIR; + exe += "/"; +#endif #ifdef COMPLEX_TEST_CMAKELIB // Test a single character executable to test a: in makefiles diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt index 3a74efc..495ceb8 100644 --- a/Tests/Complex/Library/CMakeLists.txt +++ b/Tests/Complex/Library/CMakeLists.txt @@ -7,6 +7,7 @@ REMOVE_DEFINITIONS(-DCMAKE_IS_REALLY_FUN) # UTILITY_SOURCE(CREATE_FILE_EXE create_file "." create_file.cxx) ADD_EXECUTABLE(create_file create_file.cxx) +SET_TARGET_PROPERTIES(create_file PROPERTIES RUNTIME_OUTPUT_DIRECTORY ".") # # Create static library diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index deb0800..88acae8 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -137,13 +137,9 @@ SET(FORCE_TEST 0 CACHE STRING "a test" FORCE) # # Lib and exe path # -SET (LIBRARY_OUTPUT_PATH - ${Complex_BINARY_DIR}/bin/ CACHE INTERNAL - "Single output directory for building all libraries.") - -SET (EXECUTABLE_OUTPUT_PATH - ${Complex_BINARY_DIR}/bin/ CACHE INTERNAL - "Single output directory for building all executables.") +SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/lib/static") +SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/lib") +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/bin") MESSAGE (Test " " escape " " semi-colon " " \; \;) # diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index 1603a8c..dee36ce 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -320,12 +320,17 @@ extern "C" int NameConflictTest2(); int main() { std::string lib = BINARY_DIR; - lib += "/bin/"; + lib += "/lib/"; #ifdef CMAKE_INTDIR lib += CMAKE_INTDIR; lib += "/"; #endif - std::string exe = lib; + std::string exe = BINARY_DIR; + exe += "/bin/"; +#ifdef CMAKE_INTDIR + exe += CMAKE_INTDIR; + exe += "/"; +#endif #ifdef COMPLEX_TEST_CMAKELIB // Test a single character executable to test a: in makefiles diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt index 3a74efc..495ceb8 100644 --- a/Tests/ComplexOneConfig/Library/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt @@ -7,6 +7,7 @@ REMOVE_DEFINITIONS(-DCMAKE_IS_REALLY_FUN) # UTILITY_SOURCE(CREATE_FILE_EXE create_file "." create_file.cxx) ADD_EXECUTABLE(create_file create_file.cxx) +SET_TARGET_PROPERTIES(create_file PROPERTIES RUNTIME_OUTPUT_DIRECTORY ".") # # Create static library diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt index deb0800..88acae8 100644 --- a/Tests/ComplexRelativePaths/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/CMakeLists.txt @@ -137,13 +137,9 @@ SET(FORCE_TEST 0 CACHE STRING "a test" FORCE) # # Lib and exe path # -SET (LIBRARY_OUTPUT_PATH - ${Complex_BINARY_DIR}/bin/ CACHE INTERNAL - "Single output directory for building all libraries.") - -SET (EXECUTABLE_OUTPUT_PATH - ${Complex_BINARY_DIR}/bin/ CACHE INTERNAL - "Single output directory for building all executables.") +SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/lib/static") +SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/lib") +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/bin") MESSAGE (Test " " escape " " semi-colon " " \; \;) # diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx index 1603a8c..dee36ce 100644 --- a/Tests/ComplexRelativePaths/Executable/complex.cxx +++ b/Tests/ComplexRelativePaths/Executable/complex.cxx @@ -320,12 +320,17 @@ extern "C" int NameConflictTest2(); int main() { std::string lib = BINARY_DIR; - lib += "/bin/"; + lib += "/lib/"; #ifdef CMAKE_INTDIR lib += CMAKE_INTDIR; lib += "/"; #endif - std::string exe = lib; + std::string exe = BINARY_DIR; + exe += "/bin/"; +#ifdef CMAKE_INTDIR + exe += CMAKE_INTDIR; + exe += "/"; +#endif #ifdef COMPLEX_TEST_CMAKELIB // Test a single character executable to test a: in makefiles diff --git a/Tests/ComplexRelativePaths/Library/CMakeLists.txt b/Tests/ComplexRelativePaths/Library/CMakeLists.txt index 3a74efc..495ceb8 100644 --- a/Tests/ComplexRelativePaths/Library/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Library/CMakeLists.txt @@ -7,6 +7,7 @@ REMOVE_DEFINITIONS(-DCMAKE_IS_REALLY_FUN) # UTILITY_SOURCE(CREATE_FILE_EXE create_file "." create_file.cxx) ADD_EXECUTABLE(create_file create_file.cxx) +SET_TARGET_PROPERTIES(create_file PROPERTIES RUNTIME_OUTPUT_DIRECTORY ".") # # Create static library diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index a762915..69b79f3 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -1,8 +1,11 @@ PROJECT (TestSimpleInstall) SET(CMAKE_VERBOSE_MAKEFILE 1) -#SET(EXECUTABLE_OUTPUT_PATH "${TestSimpleInstall_BINARY_DIR}/This is exec path") -SET(EXECUTABLE_OUTPUT_PATH "${TestSimpleInstall_BINARY_DIR}/ExecPath") -SET(LIBRARY_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}") +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY + "${TestSimpleInstall_BINARY_DIR}/bin dir") +SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY + "${TestSimpleInstall_BINARY_DIR}/lib static") +SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY + "${TestSimpleInstall_BINARY_DIR}/lib dir") # Skip generating the rpath pointing at the build tree to make sure # the executable is installed with the proper rpath in the install diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index a762915..69b79f3 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -1,8 +1,11 @@ PROJECT (TestSimpleInstall) SET(CMAKE_VERBOSE_MAKEFILE 1) -#SET(EXECUTABLE_OUTPUT_PATH "${TestSimpleInstall_BINARY_DIR}/This is exec path") -SET(EXECUTABLE_OUTPUT_PATH "${TestSimpleInstall_BINARY_DIR}/ExecPath") -SET(LIBRARY_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}") +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY + "${TestSimpleInstall_BINARY_DIR}/bin dir") +SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY + "${TestSimpleInstall_BINARY_DIR}/lib static") +SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY + "${TestSimpleInstall_BINARY_DIR}/lib dir") # Skip generating the rpath pointing at the build tree to make sure # the executable is installed with the proper rpath in the install |