Skip to content

Commit 144091b

Browse files
authored
[OpenMP][CMake] Revert standalone build LIBOMP_HEADERS_INSTALL_PATH (#91243)
Revert the portion of #75125 which modified the LIBOMP_HEADERS_INSTALL_PATH in standalone build. This change is harmful for real standalone builds (i.e. builds where we build openmp by itself), since it tries to overwrite the `omp.h` inside the build compiler. For all-in-one builds with clang, testing shows this change is unnecessary as #88007 already set up that build configuration so that omp.h will be put into the project build's `clang` resource directory.
1 parent ee36dd2 commit 144091b

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

openmp/CMakeLists.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,7 @@ option(OPENMP_ENABLE_LIBOMP_PROFILING "Enable time profiling for libomp." OFF)
113113

114114
# Header install location
115115
if(${OPENMP_STANDALONE_BUILD})
116-
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
117-
execute_process(
118-
OUTPUT_STRIP_TRAILING_WHITESPACE
119-
COMMAND ${CMAKE_CXX_COMPILER} --print-resource-dir
120-
RESULT_VARIABLE COMMAND_RETURN_CODE
121-
OUTPUT_VARIABLE COMPILER_RESOURCE_DIR
122-
)
123-
set(LIBOMP_HEADERS_INSTALL_PATH "${COMPILER_RESOURCE_DIR}/include")
124-
else()
125-
set(LIBOMP_HEADERS_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}")
126-
endif()
116+
set(LIBOMP_HEADERS_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}")
127117
else()
128118
include(GetClangResourceDir)
129119
get_clang_resource_dir(LIBOMP_HEADERS_INSTALL_PATH SUBDIR include)

0 commit comments

Comments
 (0)