Skip to content

Commit e96d0e4

Browse files
Updated CMakeLists and macOS cmake CI script to find omp.h
1 parent 70aeb4b commit e96d0e4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ endif()
288288
if(UNIX)
289289
option(USE_MKL_OMP "Link to MKL OMP instead of System OMP" OFF)
290290
set(MKL_OMP "" CACHE PATH "Path to the MKL OMP library")
291-
mark_as_advanced(USE_MKL_OMP MKL_OMP)
291+
set(OMP_INC "" CACHE PATH "Path to the OMP include directory")
292+
mark_as_advanced(USE_MKL_OMP MKL_OMP OMP_INC)
292293
endif()
293294

294295
##### Set appropriate defines and includes #####
@@ -524,8 +525,10 @@ endif()
524525
if(UNIX)
525526
if(${USE_MKL_OMP})
526527
target_link_libraries(${FBS_BIN_NAME} ${MKL_OMP})
528+
target_include_directories(RTLib PRIVATE ${OpenMP_C_INCLUDE_DIRS} ${OMP_INC})
527529
else()
528530
target_link_libraries(${FBS_BIN_NAME} ${OpenMP_C_LIBRARIES})
531+
target_include_directories(RTLib PRIVATE ${OpenMP_C_INCLUDE_DIRS} ${OMP_INC})
529532
endif()
530533
endif()
531534

ci/macOS/cmake.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ run_cmake() {
1212
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
1313
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
1414
-DBUILD_UPDATER=ON \
15-
-DHOMEBREW=ON
15+
-DHOMEBREW=ON \
16+
-DUSE_MKL_OMP=ON \
17+
-DMKL_OMP=/opt/intel/oneapi/compiler/latest/mac/compiler/lib/libiomp5.dylib \
18+
-DOMP_INC=/Users/gitRunner/local/x86_64/homebrew/opt/libomp/include
1619
}
1720

1821

0 commit comments

Comments
 (0)