diff --git a/circuits/cpp/barretenberg/cpp/bootstrap.sh b/circuits/cpp/barretenberg/cpp/bootstrap.sh index 83020fc2c77..34e54c40af7 100755 --- a/circuits/cpp/barretenberg/cpp/bootstrap.sh +++ b/circuits/cpp/barretenberg/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 if [ "$ARCH" = "aarch64" ]; then TOOLCHAIN=aarch64-linux-clang diff --git a/circuits/cpp/barretenberg/cpp/cmake/threading.cmake b/circuits/cpp/barretenberg/cpp/cmake/threading.cmake index e422a8ccee7..1f32c83745d 100644 --- a/circuits/cpp/barretenberg/cpp/cmake/threading.cmake +++ b/circuits/cpp/barretenberg/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.")