diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-11-15 18:01:36 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2019-12-13 15:51:46 (GMT) |
commit | 5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2 (patch) | |
tree | 7e456292c9299223c3bd851261595f24371d2f3b /Tests/OutDir | |
parent | 3bc63e99e44b3ef82c19d018f939ea839882a131 (diff) | |
download | CMake-5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2.zip CMake-5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2.tar.gz CMake-5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2.tar.bz2 |
Ninja: Add multi-config variant
Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
Diffstat (limited to 'Tests/OutDir')
-rw-r--r-- | Tests/OutDir/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/OutDir/OutDir.cmake | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Tests/OutDir/CMakeLists.txt b/Tests/OutDir/CMakeLists.txt index 823ab08..8afe036 100644 --- a/Tests/OutDir/CMakeLists.txt +++ b/Tests/OutDir/CMakeLists.txt @@ -20,7 +20,7 @@ set(top "${OutDir_BINARY_DIR}") foreach(config ${configs}) foreach(type archive runtime library) string(TOUPPER "${type}" TYPE) - set(CMAKE_${TYPE}_OUTPUT_DIRECTORY_${config} "${top}/${type}") + set(CMAKE_${TYPE}_OUTPUT_DIRECTORY_${config} "${top}/${type}/$<CONFIG>") file(REMOVE_RECURSE "${top}/${type}") endforeach() endforeach() @@ -29,7 +29,7 @@ add_subdirectory(../COnly COnly) add_custom_command( OUTPUT OutDir.h - COMMAND ${CMAKE_COMMAND} -Dtop=${top} -P ${OutDir_SOURCE_DIR}/OutDir.cmake + COMMAND ${CMAKE_COMMAND} -Dtop=${top} -Dcfg_dir=$<CONFIG> -P ${OutDir_SOURCE_DIR}/OutDir.cmake DEPENDS COnly ${OutDir_SOURCE_DIR}/OutDir.cmake ) include_directories(${top}) diff --git a/Tests/OutDir/OutDir.cmake b/Tests/OutDir/OutDir.cmake index a1f13e7..2a003b8 100644 --- a/Tests/OutDir/OutDir.cmake +++ b/Tests/OutDir/OutDir.cmake @@ -3,17 +3,17 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a" ".so" ".sl" ".dylib" ".dll.a") find_library(TESTC1_LIB NAMES testc1 testc1_test_debug_postfix - PATHS ${top}/archive + PATHS ${top}/archive/${cfg_dir} NO_DEFAULT_PATH) find_library(TESTC2_LIB NAMES testc2 testc2_test_debug_postfix - PATHS ${top}/archive ${top}/library + PATHS ${top}/archive/${cfg_dir} ${top}/library/${cfg_dir} NO_DEFAULT_PATH) find_program(CONLY_EXE NAMES COnly - PATHS ${top}/runtime + PATHS ${top}/runtime/${cfg_dir} NO_DEFAULT_PATH) file(RELATIVE_PATH TESTC1_LIB_FILE "${top}" "${TESTC1_LIB}") |