Enable BundleTest with CLang too.

This commit is contained in:
Nicolas Despres 2012-07-16 11:26:56 +02:00 committed by Peter Kümmel
parent 54d9713adb
commit 03bdaf5453
1 changed files with 33 additions and 31 deletions

View File

@ -1418,42 +1418,44 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSMidl") LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSMidl")
ENDIF(${CMAKE_TEST_GENERATOR} MATCHES "Visual Studio") ENDIF(${CMAKE_TEST_GENERATOR} MATCHES "Visual Studio")
IF (APPLE AND CMAKE_COMPILER_IS_GNUCXX) IF (APPLE)
SET(BundleTestInstallDir if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
"${CMake_BINARY_DIR}/Tests/BundleTest/InstallDirectory") SET(BundleTestInstallDir
ADD_TEST(BundleTest ${CMAKE_CTEST_COMMAND} "${CMake_BINARY_DIR}/Tests/BundleTest/InstallDirectory")
--build-and-test ADD_TEST(BundleTest ${CMAKE_CTEST_COMMAND}
"${CMake_SOURCE_DIR}/Tests/BundleTest" --build-and-test
"${CMake_BINARY_DIR}/Tests/BundleTest" "${CMake_SOURCE_DIR}/Tests/BundleTest"
--build-two-config "${CMake_BINARY_DIR}/Tests/BundleTest"
--build-generator ${CMAKE_TEST_GENERATOR} --build-two-config
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --build-generator ${CMAKE_TEST_GENERATOR}
--build-project BundleTest --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-target install --build-project BundleTest
# --build-target package --build-target install
--build-options "-DCMAKE_INSTALL_PREFIX:PATH=${BundleTestInstallDir}" # --build-target package
"-DCMake_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}" --build-options "-DCMAKE_INSTALL_PREFIX:PATH=${BundleTestInstallDir}"
--test-command "-DCMake_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}"
${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe) --test-command
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest") ${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(CFBundleTest ${CMAKE_CTEST_COMMAND}
--build-and-test --build-and-test
"${CMake_SOURCE_DIR}/Tests/CFBundleTest" "${CMake_SOURCE_DIR}/Tests/CFBundleTest"
"${CMake_BINARY_DIR}/Tests/CFBundleTest" "${CMake_BINARY_DIR}/Tests/CFBundleTest"
--build-two-config --build-two-config
--build-generator ${CMAKE_TEST_GENERATOR} --build-generator ${CMAKE_TEST_GENERATOR}
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project CFBundleTest --build-project CFBundleTest
--test-command --test-command
${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE} ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE}
-Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest -Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest
-Dgen=${CMAKE_TEST_GENERATOR} -Dgen=${CMAKE_TEST_GENERATOR}
-P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake) -P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CFBundleTest") LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CFBundleTest")
ADD_TEST_MACRO(ObjC++ ObjC++) ADD_TEST_MACRO(ObjC++ ObjC++)
ENDIF (APPLE AND CMAKE_COMPILER_IS_GNUCXX) ENDIF (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
ENDIF (APPLE)
IF(APPLE AND CTEST_TEST_CPACK) IF(APPLE AND CTEST_TEST_CPACK)
ADD_TEST(BundleGeneratorTest ${CMAKE_CTEST_COMMAND} ADD_TEST(BundleGeneratorTest ${CMAKE_CTEST_COMMAND}