File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,12 @@ defaulted_option(SwiftCore_ENABLE_COMMANDLINE_SUPPORT "Enable command line argum
66
66
defaulted_option (SwiftCore_ENABLE_RUNTIME_FUNCTION_COUNTERS "Enable runtime function counter support" )
67
67
68
68
defaulted_option (SwiftCore_ENABLE_BACKTRACING "Enable backtracing runtime support" )
69
- set (SwiftCore_BACKTRACER_PATH ${SwiftCore_BACKTRACER_PATH_default} CACHE STRING "Set a fixed path to the Swift backtracer" )
69
+ defaulted_set (SwiftCore_BACKTRACER_PATH STRING "Set a fixed path to the Swift backtracer" )
70
70
71
71
option (SwiftCore_ENABLE_CLOBBER_FREED_OBJECTS "" OFF )
72
72
option (SwiftCore_ENABLE_RUNTIME_LEAK_CHECKER "" OFF )
73
73
74
- set (SwiftCore_OBJECT_FORMAT " ${SwiftCore_OBJECT_FORMAT_default} " CACHE STRING "Object format" )
74
+ defaulted_set (SwiftCore_OBJECT_FORMAT STRING "Object format: ELF COFF " )
75
75
76
76
add_compile_definitions (
77
77
$< $< BOOL:${SwiftCore_ENABLE_OBJC_INTEROP} > :-DSWIFT_OBJC_INTEROP>
@@ -82,7 +82,7 @@ add_compile_definitions(
82
82
$< $< COMPILE_LANGUAGE:C,CXX> :-DSWIFT_RUNTIME_ENABLE_LEAK_CHECKER=$< BOOL:${SwiftCore_ENABLE_RUNTIME_LEAK_CHECKER} > >
83
83
$< $< COMPILE_LANGUAGE:C,CXX> :-DSWIFT_RUNTIME_CLOBBER_FREED_OBJECTS=$< BOOL:${SwiftCore_ENABLE_CLOBBER_FREED_OBJECTS} > > )
84
84
85
- add_compile_options ( $< $< AND:$< COMPILE_LANGUAGE:Swift> ,$< BOOL:${SwiftCore_ENABLE_LIBRARY_EVOLUTION} > > :-enable-library-evolution> )
85
+ add_compile_options ($< $< AND:$< COMPILE_LANGUAGE:Swift> ,$< BOOL:${SwiftCore_ENABLE_LIBRARY_EVOLUTION} > > :-enable-library-evolution> )
86
86
87
87
include_directories (include )
88
88
Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ macro(defaulted_option variable helptext)
17
17
option (${variable} ${helptext} ${${variable}_default} )
18
18
endmacro ()
19
19
20
+ macro (defaulted_set variable type helptext )
21
+ if (DEFINED ${variable} _default )
22
+ set (${variable} ${variable} _default CACHE ${type} ${helptext} )
23
+ endif ()
24
+ endmacro ()
25
+
20
26
if (APPLE )
21
27
set (SwiftCore_ENABLE_LIBRARY_EVOLUTION_default ON )
22
28
set (SwiftCore_ENABLE_CRASH_REPORTER_CLIENT_default ON )
You can’t perform that action at this time.
0 commit comments