Skip to content

Commit f60c699

Browse files
committed
[OpenMP] Fix intermediate header locations for OpenMP
Summary: A previous patch moved the code here and accidentally overrwrote the include path that the LSP interface used. This caused incorrect errors when using clangd with the offload project. This patch removes the unnecessary header and makes sure we include the correct folder.
1 parent f0b3654 commit f60c699

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

openmp/runtime/src/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ endif()
2020
# Configure omp.h, kmp_config.h and omp-tools.h if necessary
2121
configure_file(${LIBOMP_INC_DIR}/omp.h.var ${LIBOMP_HEADERS_INTDIR}/omp.h @ONLY)
2222
configure_file(${LIBOMP_INC_DIR}/ompx.h.var ${LIBOMP_HEADERS_INTDIR}/ompx.h @ONLY)
23-
configure_file(kmp_config.h.cmake ${LIBOMP_HEADERS_INTDIR}/kmp_config.h @ONLY)
23+
configure_file(kmp_config.h.cmake kmp_config.h @ONLY)
2424
if(${LIBOMP_OMPT_SUPPORT})
2525
configure_file(${LIBOMP_INC_DIR}/omp-tools.h.var ${LIBOMP_HEADERS_INTDIR}/omp-tools.h @ONLY)
2626
endif()
@@ -55,7 +55,6 @@ include_directories(
5555
${LIBOMP_SRC_DIR}/i18n
5656
${LIBOMP_INC_DIR}
5757
${LIBOMP_SRC_DIR}/thirdparty/ittnotify
58-
${LIBOMP_HEADERS_INTDIR}
5958
)
6059

6160
# Building with time profiling support requires LLVM directory includes.
@@ -441,7 +440,7 @@ if(${LIBOMP_OMPT_SUPPORT})
441440
install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH})
442441
# install under legacy name ompt.h
443442
install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} RENAME ompt.h)
444-
set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${LIBOMP_HEADERS_INTDIR} PARENT_SCOPE)
443+
set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
445444
endif()
446445
if(${BUILD_FORTRAN_MODULES})
447446
set (destination ${LIBOMP_HEADERS_INSTALL_PATH})

0 commit comments

Comments
 (0)