@@ -75,13 +75,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
75
75
endif ()
76
76
add_dependencies (uuid CoreFoundation )
77
77
78
- set (swift_optimization_flags )
79
- if (NOT CMAKE_BUILD_TYPE MATCHES Debug )
80
- set (swift_optimization_flags -O )
81
- endif ()
82
- if (ENABLE_TESTING )
83
- set (swift_enable_testing -enable-testing )
84
- endif ()
85
78
if (CMAKE_SYSTEM_NAME STREQUAL Windows )
86
79
set (swift_libc_flags -libc;${CMAKE_MSVC_RUNTIME_LIBRARY} )
87
80
if (CMAKE_SYSTEM_NAME STREQUAL Debug )
@@ -296,8 +289,8 @@ add_swift_library(Foundation
296
289
$< $< BOOL:FOUNDATION_ENABLE_LIBDISPATCH> :-DDEPLOYMENT_ENABLE_LIBDISPATCH>
297
290
-I;${ICU_INCLUDE_DIR}
298
291
${libdispatch_cflags}
299
- ${swift_enable_testing}
300
- ${swift_optimization_flags}
292
+ $< $< BOOL:ENABLE_TESTING > :-enable-testing >
293
+ $< $< NOT: $< CONFIG:Debug > > :-O >
301
294
${swift_libc_flags}
302
295
DEPENDS
303
296
uuid
@@ -401,8 +394,8 @@ add_swift_executable(plutil
401
394
-I;${CMAKE_CURRENT_BINARY_DIR}/swift
402
395
-I;${ICU_INCLUDE_DIR}
403
396
${libdispatch_cflags}
404
- ${swift_enable_testing}
405
- ${swift_optimization_flags}
397
+ $< $< BOOL:ENABLE_TESTING > :-enable-testing >
398
+ $< $< NOT: $< CONFIG:Debug > > :-O >
406
399
${swift_libc_flags}
407
400
DEPENDS
408
401
uuid
@@ -571,7 +564,7 @@ if(ENABLE_TESTING)
571
564
-I;${FOUNDATION_PATH_TO_XCTEST_BUILD}/swift
572
565
-I;${ICU_INCLUDE_DIR}
573
566
${libdispatch_cflags}
574
- ${swift_optimization_flags}
567
+ $< $< NOT: $< CONFIG:Debug > > :-O >
575
568
${swift_libc_flags}
576
569
DEPENDS
577
570
Foundation
0 commit comments