diff --git a/products/llbuildSwift/CMakeLists.txt b/products/llbuildSwift/CMakeLists.txt index 918bde56..677a103f 100644 --- a/products/llbuildSwift/CMakeLists.txt +++ b/products/llbuildSwift/CMakeLists.txt @@ -15,9 +15,14 @@ if(CMAKE_VERSION VERSION_LESS 3.16) endif() endif() +# Set x86_64 default if CMAKE_OSX_ARCHITECTURES is not set +if(NOT DEFINED CMAKE_OSX_ARCHITECTURES) + set(CMAKE_OSX_ARCHITECTURES "x86_64") +endif() + # TODO(compnerd) move both of these outside of the CMake into the invocation if(CMAKE_SYSTEM_NAME STREQUAL Darwin) - add_compile_options(-target x86_64-apple-macosx10.10) + add_compile_options(-target ${CMAKE_OSX_ARCHITECTURES}-apple-macosx10.10) if(NOT CMAKE_OSX_SYSROOT STREQUAL "") add_compile_options(-sdk ${CMAKE_OSX_SYSROOT}) endif()