Merge topic 'xcode5-xctest'

6ab14134 Tests: Enable XCTest tests for Xcode 5
52642b46 OS X: Look for Xcode 5 platform-specific Frameworks
This commit is contained in:
Brad King 2015-03-24 11:26:21 -04:00 committed by CMake Topic Stage
commit ed777f1837
2 changed files with 15 additions and 7 deletions

View File

@ -167,12 +167,20 @@ if(_CMAKE_OSX_SYSROOT_PATH)
${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks ${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks
) )
# add platform developer framework path if exists # add platform developer framework path if exists
get_filename_component(_CMAKE_OSX_PLATFORM_FRAMEWORK_PATH foreach(_path
${_CMAKE_OSX_SYSROOT_PATH}/../../Library/Frameworks ABSOLUTE) # Xcode 6
if(IS_DIRECTORY ${_CMAKE_OSX_PLATFORM_FRAMEWORK_PATH}) ${_CMAKE_OSX_SYSROOT_PATH}/../../Library/Frameworks
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH # Xcode 5 iOS
${_CMAKE_OSX_PLATFORM_FRAMEWORK_PATH}) ${_CMAKE_OSX_SYSROOT_PATH}/Developer/Library/Frameworks
endif() # Xcode 5 OSX
${_CMAKE_OSX_SYSROOT_PATH}/../../../../../Library/Frameworks
)
get_filename_component(_abolute_path "${_path}" ABSOLUTE)
if(EXISTS "${_abolute_path}")
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH "${_abolute_path}")
break()
endif()
endforeach()
endif() endif()
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
/Library/Frameworks /Library/Frameworks

View File

@ -1519,7 +1519,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
) )
endif() endif()
if(CMake_TEST_XCODE_VERSION AND NOT CMake_TEST_XCODE_VERSION VERSION_LESS 6 if(CMake_TEST_XCODE_VERSION AND NOT CMake_TEST_XCODE_VERSION VERSION_LESS 5
AND OSX_VERSION MATCHES "^([0-9]+\\.[0-9]+)") AND OSX_VERSION MATCHES "^([0-9]+\\.[0-9]+)")
set(XCTest_BUILD_OPTIONS -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_MATCH_1}) set(XCTest_BUILD_OPTIONS -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_MATCH_1})
ADD_TEST_MACRO(XCTest ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> -V) ADD_TEST_MACRO(XCTest ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> -V)