diff --git a/cpp/bootstrap.sh b/cpp/bootstrap.sh index 42cf25f6fc..8b1396d947 100755 --- a/cpp/bootstrap.sh +++ b/cpp/bootstrap.sh @@ -45,6 +45,9 @@ if [ "$OS" == "macos" ]; then else TOOLCHAIN=x86_64-apple-clang fi + + export LDFLAGS="-L$BREW_PREFIX/opt/libomp/lib" + export CPPFLAGS="-I$BREW_PREFIX/opt/libomp/include" else TOOLCHAIN=x86_64-linux-clang fi diff --git a/cpp/cmake/threading.cmake b/cpp/cmake/threading.cmake index f91b86b385..bf9508c003 100644 --- a/cpp/cmake/threading.cmake +++ b/cpp/cmake/threading.cmake @@ -1,20 +1,3 @@ -if(APPLE) - if(CMAKE_C_COMPILER_ID MATCHES "Clang") - set(OpenMP_C_FLAGS "-fopenmp") - set(OpenMP_C_FLAGS_WORK "-fopenmp") - set(OpenMP_C_LIB_NAMES "libomp") - set(OpenMP_C_LIB_NAMES_WORK "libomp") - set(OpenMP_libomp_LIBRARY "$ENV{BREW_PREFIX}/opt/libomp/lib/libomp.dylib") - endif() - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(OpenMP_CXX_FLAGS "-fopenmp") - set(OpenMP_CXX_FLAGS_WORK "-fopenmp") - set(OpenMP_CXX_LIB_NAMES "libomp") - set(OpenMP_CXX_LIB_NAMES_WORK "libomp") - set(OpenMP_libomp_LIBRARY "$ENV{BREW_PREFIX}/opt/libomp/lib/libomp.dylib") - endif() -endif() - if(MULTITHREADING) find_package(OpenMP REQUIRED) message(STATUS "Multithreading is enabled.")