Skip to content

Commit

Permalink
Updated CMakeLists and macOS CI cmake script to fix issues with omp h…
Browse files Browse the repository at this point in the history
…eader
  • Loading branch information
michaelrossherron committed Jan 16, 2025
1 parent ae68530 commit fa8cbfc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ if(WIN32)
add_compile_options(/MP /wd4996 /wd4251 /wd4275)
elseif(APPLE)
set(CMAKE_BUILD_RPATH @executable_path/../lib/;@executable_path/../Frameworks)
set(OMP_INC "" CACHE PATH "Path to the OMP include directory")
mark_as_advanced(OMP_INC)
else()
add_compile_options(-fopenmp -w)

Expand Down Expand Up @@ -326,6 +328,12 @@ else()
endif()
endif()

# Manually pull in include dirs for OpenMP on macOS
if(APPLE)
{
target_include_directories(febiomech PRIVATE ${OpenMP_C_INCLUDE_DIRS} ${OMP_INC})
}

# Link Pardiso-project
if(USE_PDL)
target_compile_definitions(numcore PRIVATE PARDISODL)
Expand Down
3 changes: 2 additions & 1 deletion ci/macOS/cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ cmake . -B cmbuild -L \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DUSE_MMG=ON \
-DUSE_LEVMAR=ON \
-DUSE_HYPRE=ON
-DUSE_HYPRE=ON \
-DOMP_INC=/Users/gitRunner/local/x86_64/homebrew/opt/libomp/include

0 comments on commit fa8cbfc

Please sign in to comment.