diff options
author | Brad King <brad.king@kitware.com> | 2009-12-08 16:44:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-12-08 16:44:28 (GMT) |
commit | d4ada9d0d540ab2dc2a9747315c5afda5887950f (patch) | |
tree | 2070d061a0fa5bef543c1b3c3e120e75413295d6 /CMakeLists.txt | |
parent | d4e26b7e881f97f1cef31b789a7252708cf1c06b (diff) | |
download | CMake-d4ada9d0d540ab2dc2a9747315c5afda5887950f.zip CMake-d4ada9d0d540ab2dc2a9747315c5afda5887950f.tar.gz CMake-d4ada9d0d540ab2dc2a9747315c5afda5887950f.tar.bz2 |
Clean up CMake build tree 'bin' directory
We re-arrange EXECUTABLE_OUTPUT_PATH settings to avoid putting utility
and test executables in the 'bin' directory of the build tree. This
makes the directory look like that in the installation tree, except that
on multi-configuration generators we still use a per-config
subdirectory.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 40ec9ad..5d03dce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,8 @@ MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY) # Allow empty endif() and such with CMake 2.4. SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1) +SET(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin) + IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) # Since the built CMake will install itself instead of the # generating CMake, tell it that the install rules were generated @@ -134,9 +136,9 @@ MACRO(CMAKE_SETUP_TESTING) # the ctest from this cmake is used for testing # and not the ctest from the cmake building and testing # cmake. - SET(CMAKE_CTEST_COMMAND "${EXECUTABLE_OUTPUT_PATH}/ctest") - SET(CMAKE_CMAKE_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cmake") - SET(CMAKE_CPACK_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cpack") + SET(CMAKE_CTEST_COMMAND "${CMake_BIN_DIR}/ctest") + SET(CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR}/cmake") + SET(CMAKE_CPACK_COMMAND "${CMake_BIN_DIR}/cpack") ENDIF(BUILD_TESTING) # configure some files for testing @@ -342,8 +344,7 @@ INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake) # where to write the resulting executables and libraries SET(BUILD_SHARED_LIBS OFF) -SET(EXECUTABLE_OUTPUT_PATH ${CMake_BINARY_DIR}/bin CACHE INTERNAL - "Where to put the executables for CMake") +SET(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "No configurable exe dir.") SET(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL "Where to put the libraries for CMake") |