Don't use llvm library from homebrew since this caused mixing of
new and older libc++ libraries.
Don't tune for intel when using clang or appleclang on darwin.
@@ -46,27 +46,16 @@ endfunction()
function(setup_vespa_default_build_settings_darwin)
message("-- Setting up default build settings for darwin")
- if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
- set(DEFAULT_LLVM_INCLUDE_DIRECTORY "/usr/local/opt/llvm/include")
- set(DEFAULT_LLVM_LINK_DIRECTORY "/usr/local/opt/llvm/lib")
set(DEFAULT_VESPA_LLVM_VERSION "12" PARENT_SCOPE)
- else()
- set(DEFAULT_VESPA_LLVM_VERSION "12" PARENT_SCOPE)
- endif()
set(DEFAULT_CMAKE_PREFIX_PATH "${VESPA_DEPS}" "/usr/local/opt/bison" "/usr/local/opt/flex" "/usr/local/opt/openssl@1.1" "/usr/local/opt/openblas" "/usr/local/opt/icu4c" PARENT_SCOPE)
set(DEFAULT_EXTRA_LINK_DIRECTORY "${VESPA_DEPS}/lib" "/usr/local/opt/bison/lib" "/usr/local/opt/flex/lib" "/usr/local/opt/icu4c/lib" "/usr/local/opt/openssl@1.1/lib" "/usr/local/opt/openblas/lib")
- if(DEFINED DEFAULT_LLVM_LINK_DIRECTORY)
- list(APPEND DEFAULT_EXTRA_LINK_DIRECTORY "${DEFAULT_LLVM_LINK_DIRECTORY}")
- endif()
list(APPEND DEFAULT_EXTRA_LINK_DIRECTORY "/usr/local/lib")
set(DEFAULT_EXTRA_LINK_DIRECTORY "${DEFAULT_EXTRA_LINK_DIRECTORY}" PARENT_SCOPE)
set(DEFAULT_EXTRA_INCLUDE_DIRECTORY "${VESPA_DEPS}/include" "/usr/local/opt/flex/include" "/usr/local/opt/icu4c/include" "/usr/local/opt/openssl@1.1/include" "/usr/local/opt/openblas/include")
- if(DEFINED DEFAULT_LLVM_INCLUDE_DIRECTORY)
- list(APPEND DEFAULT_EXTRA_INCLUDE_DIRECTORY "${DEFAULT_LLVM_INCLUDE_DIRECTORY}")
- endif()
list(APPEND DEFAULT_EXTRA_INCLUDE_DIRECTORY "/usr/local/include")
set(DEFAULT_EXTRA_INCLUDE_DIRECTORY "${DEFAULT_EXTRA_INCLUDE_DIRECTORY}" PARENT_SCOPE)
endfunction()
+
function(setup_vespa_default_build_settings_fedora_32)
message("-- Setting up default build settings for fedora 32")
set(DEFAULT_EXTRA_INCLUDE_DIRECTORY "${VESPA_DEPS}/include" "/usr/include/openblas" PARENT_SCOPE)
@@ -246,6 +235,7 @@ function(vespa_use_default_build_settings)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
if(VESPA_OS_DISTRO STREQUAL "fedora" AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(DEFAULT_VESPA_CPU_ARCH_FLAGS "-march=westmere -mtune=haswell")
+ elseif(APPLE AND (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")))
else()
set(DEFAULT_VESPA_CPU_ARCH_FLAGS "-mtune=intel")
endif()
