mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-01 12:18:36 -06:00
@@ -141,6 +141,16 @@ endfunction()
|
||||
|
||||
XcodeRemoveExcessiveISystem()
|
||||
|
||||
function(XcodeXCConfig)
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeXCConfig-build)
|
||||
run_cmake(XcodeXCConfig)
|
||||
set(RunCMake_TEST_NO_CLEAN 1)
|
||||
run_cmake_command(XcodeXCConfig-build ${CMAKE_COMMAND} --build . --config Debug)
|
||||
run_cmake_command(XcodeXCConfig-build ${CMAKE_COMMAND} --build . --config Release)
|
||||
endfunction()
|
||||
|
||||
XcodeXCConfig()
|
||||
|
||||
# Isolate device tests from host architecture selection.
|
||||
unset(ENV{CMAKE_OSX_ARCHITECTURES})
|
||||
|
||||
|
||||
20
Tests/RunCMake/XcodeProject/XcodeXCConfig.c
Normal file
20
Tests/RunCMake/XcodeProject/XcodeXCConfig.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef BUILD_DEBUG
|
||||
# error BUILD_DEBUG is undefined
|
||||
#endif
|
||||
#ifndef GLOBAL_DEBUG
|
||||
# error GLOBAL_DEBUG is undefined
|
||||
#endif
|
||||
#ifndef TARGET_DEBUG
|
||||
# error TARGET_DEBUG is undefined
|
||||
#endif
|
||||
|
||||
#if GLOBAL_DEBUG != BUILD_DEBUG
|
||||
# error GLOBAL_DEBUG does not match BUILD_DEBUG
|
||||
#endif
|
||||
#if TARGET_DEBUG != BUILD_DEBUG
|
||||
# error TARGET_DEBUG does not match BUILD_DEBUG
|
||||
#endif
|
||||
|
||||
void some_symbol()
|
||||
{
|
||||
}
|
||||
11
Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake
Normal file
11
Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
|
||||
project(XcodeXCConfig C)
|
||||
|
||||
set(CMAKE_XCODE_XCCONFIG "$<IF:$<CONFIG:Debug>,XcodeXCConfig.global.debug.xcconfig,XcodeXCConfig.global.release.xcconfig>")
|
||||
|
||||
add_library(somelib XcodeXCConfig.c)
|
||||
target_compile_definitions(somelib PUBLIC "BUILD_DEBUG=$<IF:$<CONFIG:Debug>,1,0>")
|
||||
set_target_properties(somelib PROPERTIES
|
||||
XCODE_XCCONFIG "$<IF:$<CONFIG:Debug>,XcodeXCConfig.target.debug.xcconfig,XcodeXCConfig.target.release.xcconfig>"
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
OTHER_CFLAGS = $(inherited) -DGLOBAL_DEBUG=1
|
||||
@@ -0,0 +1 @@
|
||||
OTHER_CFLAGS = $(inherited) -DGLOBAL_DEBUG=0
|
||||
@@ -0,0 +1 @@
|
||||
OTHER_CFLAGS = $(inherited) -DTARGET_DEBUG=1
|
||||
@@ -0,0 +1 @@
|
||||
OTHER_CFLAGS = $(inherited) -DTARGET_DEBUG=0
|
||||
Reference in New Issue
Block a user