diff options
author | Brad King <brad.king@kitware.com> | 2014-12-19 13:26:57 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-12-19 13:26:57 (GMT) |
commit | ccd5822a8322155a491ad871fa135cfce1ef9a88 (patch) | |
tree | 60c1a65be27fabf3d7d17bc39c1595a367f9be8d /Tests | |
parent | 1ac8523c3bd4f404d8306b3d5fe905e1d988461c (diff) | |
parent | b189c5994d94b8dd0afdf14844db4a4be28cf4b1 (diff) | |
download | CMake-ccd5822a8322155a491ad871fa135cfce1ef9a88.zip CMake-ccd5822a8322155a491ad871fa135cfce1ef9a88.tar.gz CMake-ccd5822a8322155a491ad871fa135cfce1ef9a88.tar.bz2 |
Merge topic 'osx-cfbundle-tweaks'
b189c599 Tests: Run CFBundleTest only with valid configuration
3a605693 Xcode: Call IsCFBundleOnApple to decide if bundle is being built
207b7af0 cmTarget: Use GetCFBundleDirectory within GetFullNameInternal
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CFBundleTest/VerifyResult.cmake | 9 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 5 |
2 files changed, 6 insertions, 8 deletions
diff --git a/Tests/CFBundleTest/VerifyResult.cmake b/Tests/CFBundleTest/VerifyResult.cmake index e622900..e637bb1 100644 --- a/Tests/CFBundleTest/VerifyResult.cmake +++ b/Tests/CFBundleTest/VerifyResult.cmake @@ -14,13 +14,10 @@ message(STATUS "CTEST_CONFIGURATION_TYPE='${CTEST_CONFIGURATION_TYPE}'") message(STATUS "dir='${dir}'") message(STATUS "gen='${gen}'") -if(gen MATCHES "Make" OR - "${CTEST_CONFIGURATION_TYPE}" STREQUAL "" OR - "${CTEST_CONFIGURATION_TYPE}" STREQUAL "." OR - "${CTEST_CONFIGURATION_TYPE}" STREQUAL "NoConfig") - set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") -else() +if(gen STREQUAL "Xcode") set(expected_filename "${dir}/${CTEST_CONFIGURATION_TYPE}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") +else() + set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") endif() if(NOT EXISTS "${expected_filename}") diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 250e966..8528042 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1931,16 +1931,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest") - add_test(CFBundleTest ${CMAKE_CTEST_COMMAND} + add_test(NAME CFBundleTest COMMAND ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/CFBundleTest" "${CMake_BINARY_DIR}/Tests/CFBundleTest" --build-two-config ${build_generator_args} --build-project CFBundleTest + --build-config $<CONFIGURATION> --build-options ${build_options} --test-command - ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE} + ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=$<CONFIGURATION> -Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest -Dgen=${CMAKE_GENERATOR} -P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake) |