Swift: define CMAKE_Swift_FLAGS correctly

Invoke `cmake_initialize_per_config_variable` to ensure that build type
flags are properly initialised.
This commit is contained in:
Saleem Abdulrasool 2019-08-11 17:57:16 -07:00
parent 70c56b856c
commit 4d83e47c05

View File

@ -55,6 +55,8 @@ set(CMAKE_Swift_FLAGS_RELEASE_INIT "-O")
set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_INIT "-O -g") set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_INIT "-O -g")
set(CMAKE_Swift_FLAGS_MINSIZEREL_INIT "-Osize") set(CMAKE_Swift_FLAGS_MINSIZEREL_INIT "-Osize")
cmake_initialize_per_config_variable(CMAKE_Swift_FLAGS "Swift Compiler Flags")
# NOTE(compnerd) we do not have an object compile rule since we build the objects as part of the link step # NOTE(compnerd) we do not have an object compile rule since we build the objects as part of the link step
if(NOT CMAKE_Swift_COMPILE_OBJECT) if(NOT CMAKE_Swift_COMPILE_OBJECT)
set(CMAKE_Swift_COMPILE_OBJECT ":") set(CMAKE_Swift_COMPILE_OBJECT ":")