Skip to content

Commit 8453d85

Browse files
committed
[openmp] - Ensure that -fopenmp is used with OpenMP::omp target
When this config is found via find_package(OpenMP CONFIG) ensure that when the OpenMP::omp target is used, we include -fopenmp for the compulation.
1 parent a9c68ba commit 8453d85

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

openmp/runtime/openmp-config.cmake.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ set_and_check( openmp_INCLUDE_DIR "@PACKAGE_LIBOMP_HEADERS_INSTALL_PATH@" )
1111
set_and_check( openmp_INCLUDE_DIRS "${openmp_INCLUDE_DIR}" )
1212

1313
include( "${CMAKE_CURRENT_LIST_DIR}/openmpTargets.cmake" )
14+
15+
set_property(TARGET OpenMP::omp APPEND PROPERTY
16+
INTERFACE_COMPILE_OPTIONS "-fopenmp"
17+
)

0 commit comments

Comments
 (0)