diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt index 3cbb2543369b..97ffa2991678 100644 --- a/openmp/runtime/src/CMakeLists.txt +++ b/openmp/runtime/src/CMakeLists.txt @@ -189,11 +189,17 @@ else() set(LIBOMP_LINKER_LANGUAGE CXX) endif() if(LIBOMP_USE_HWLOC) + # Since we are using an OBJECT library, the PRIVATE and INTERFACE options are split + # (instead of using PUBLIC): obj.omp for compiling itself, omp for propagating + # the options to other libraries that depend on it, e.g. libompd. + target_include_directories(obj.omp + PRIVATE + "$" + "$") target_include_directories(omp - PUBLIC - "$" - "$" - ) + INTERFACE + "$" + "$") endif() if(OPENMP_MSVC_NAME_SCHEME)