diff options
author | Ankit <ankitm> | 2020-09-07 21:52:39 +0300 |
---|---|---|
committer | Ankit Meel <ankitjmeel@gmail.com> | 2020-09-07 21:53:48 +0300 |
commit | 6aaa6c96a1c5b1cfb093433f96999086534ef18b (patch) | |
tree | cdf034d5c981d7c385fdfba629d7dfe0045d9d16 /CMakeLists.txt | |
parent | 40dcf686f04f7db8110f9c85621eb8a0bd764080 (diff) |
Tests: set build directory using build type
Similar to {rB0a5f7061369d53b4eac55362ad2}
but also for Xcode and Ninja multi-config.
This silences 44 pairs of warnings like:
/bin/rm -f build_full/bin/tests/BLI_ghash_performance_test
"build_full/CMakeScripts/XCODE_DEPEND_HELPER.make:42: warning:
ignoring old commands for target
`build_full/bin/tests/BLI_ghash_performance_test'"
/bin/rm -f build_full/bin/tests/BLI_ghash_performance_test
"build_full/CMakeScripts/XCODE_DEPEND_HELPER.make:3523: warning:
overriding commands for target
`build_full/bin/tests/BLI_ghash_performance_test'"
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D8815
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f72ccd857b3..cfc49505a0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,7 +128,9 @@ enable_testing() set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE) set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE) -if(MSVC) + +get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(GENERATOR_IS_MULTI_CONFIG) set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/$<CONFIG>/ CACHE INTERNAL "" FORCE) else() set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/ CACHE INTERNAL "" FORCE) |