build: rename flags to cmake_flags (NFC)
@@ -8,31 +8,31 @@ function(add_swift_target target)
cmake_parse_arguments(AST "${options}" "${single_value_options}" "${multiple_value_options}" ${ARGN})
- set(flags ${CMAKE_SWIFT_FLAGS})
+ set(compile_flags ${CMAKE_SWIFT_FLAGS})
set(link_flags)
if(AST_TARGET)
- list(APPEND flags -target;${AST_TARGET})
+ list(APPEND compile_flags -target;${AST_TARGET})
endif()
if(AST_MODULE_NAME)
- list(APPEND flags -module-name;${AST_MODULE_NAME})
+ list(APPEND compile_flags -module-name;${AST_MODULE_NAME})
else()
- list(APPEND flags -module-name;${target})
+ list(APPEND compile_flags -module-name;${target})
endif()
if(AST_MODULE_LINK_NAME)
- list(APPEND flags -module-link-name;${AST_MODULE_LINK_NAME})
+ list(APPEND compile_flags -module-link-name;${AST_MODULE_LINK_NAME})
endif()
if(AST_MODULE_CACHE_PATH)
- list(APPEND flags -module-cache-path;${AST_MODULE_CACHE_PATH})
+ list(APPEND compile_flags -module-cache-path;${AST_MODULE_CACHE_PATH})
endif()
if(AST_SWIFT_FLAGS)
foreach(flag ${AST_SWIFT_FLAGS})
- list(APPEND flags ${flag})
+ list(APPEND compile_flags ${flag})
endforeach()
endif()
if(AST_CFLAGS)
foreach(flag ${AST_CFLAGS})
- list(APPEND flags -Xcc;${flag})
+ list(APPEND compile_flags -Xcc;${flag})
endforeach()
endif()
if(AST_LINK_FLAGS)
@@ -99,7 +99,7 @@ function(add_swift_target target)
${source}
${AST_DEPENDS}
COMMAND
- ${CMAKE_SWIFT_COMPILER} -frontend ${flags} -emit-module-path ${mod} -emit-module-doc-path ${doc} -o ${obj} -c ${all_sources})
+ ${CMAKE_SWIFT_COMPILER} -frontend ${compile_flags} -emit-module-path ${mod} -emit-module-doc-path ${doc} -o ${obj} -c ${all_sources})
list(APPEND objs ${obj})
list(APPEND mods ${mod})
@@ -122,7 +122,7 @@ function(add_swift_target target)
${docs}
${AST_DEPENDS}
COMMAND
- ${CMAKE_SWIFT_COMPILER} -frontend ${flags} -sil-merge-partial-modules -emit-module ${mods} -o ${module} -emit-module-doc-path ${documentation})
+ ${CMAKE_SWIFT_COMPILER} -frontend ${compile_flags} -sil-merge-partial-modules -emit-module ${mods} -o ${module} -emit-module-doc-path ${documentation})
endif()
if(AST_LIBRARY)
