Skip to content

Commit 28a867c

Browse files
committed
[offload] Define LIBOMP_*_DIR in standalone builds
Define `LIBOMP_INCLUDE_DIR` and `LIBOMP_LIBRARY_DIR` for testing in standalone builds.
1 parent 0d39fbd commit 28a867c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

offload/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,17 @@ if(OPENMP_STANDALONE_BUILD)
288288
REQUIRED
289289
)
290290

291+
find_path (
292+
LIBOMP_INCLUDE_DIR
293+
NAMES
294+
omp.h
295+
HINTS
296+
${COMPILER_RESOURCE_DIR}/include
297+
${CMAKE_INSTALL_PREFIX}/include
298+
)
299+
300+
get_filename_component(LIBOMP_LIBRARY_DIR ${LIBOMP_STANDALONE} DIRECTORY)
301+
291302
set(OPENMP_TEST_FLAGS "" CACHE STRING
292303
"Extra compiler flags to send to the test compiler.")
293304
set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING

0 commit comments

Comments
 (0)