[Openmp-commits] [openmp] 144091b - [OpenMP][CMake] Revert standalone build LIBOMP_HEADERS_INSTALL_PATH (#91243)

via Openmp-commits openmp-commits at lists.llvm.org
Mon May 6 14:12:42 PDT 2024


Author: David Tenty
Date: 2024-05-06T17:12:38-04:00
New Revision: 144091b361c6419ea37ae96341980481e90c4122

URL: https://github.com/llvm/llvm-project/commit/144091b361c6419ea37ae96341980481e90c4122
DIFF: https://github.com/llvm/llvm-project/commit/144091b361c6419ea37ae96341980481e90c4122.diff

LOG: [OpenMP][CMake] Revert standalone build LIBOMP_HEADERS_INSTALL_PATH (#91243)

Revert the portion of https://github.com/llvm/llvm-project/pull/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 https://github.com/llvm/llvm-project/pull/88007
already set up that build configuration so that omp.h will be put into
the project build's `clang` resource directory.

Added: 
    

Modified: 
    openmp/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt
index 95f2425db3ee6b..9097ca5623000c 100644
--- a/openmp/CMakeLists.txt
+++ b/openmp/CMakeLists.txt
@@ -113,17 +113,7 @@ option(OPENMP_ENABLE_LIBOMP_PROFILING "Enable time profiling for libomp." OFF)
 
 # Header install location
 if(${OPENMP_STANDALONE_BUILD})
-  if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-    execute_process(
-      OUTPUT_STRIP_TRAILING_WHITESPACE
-      COMMAND ${CMAKE_CXX_COMPILER} --print-resource-dir
-      RESULT_VARIABLE COMMAND_RETURN_CODE
-      OUTPUT_VARIABLE COMPILER_RESOURCE_DIR
-    )
-    set(LIBOMP_HEADERS_INSTALL_PATH "${COMPILER_RESOURCE_DIR}/include")
-  else()
-    set(LIBOMP_HEADERS_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}")
-  endif()
+  set(LIBOMP_HEADERS_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}")
 else()
   include(GetClangResourceDir)
   get_clang_resource_dir(LIBOMP_HEADERS_INSTALL_PATH SUBDIR include)


        


More information about the Openmp-commits mailing list