Skip to content

Commit 14435a2

Browse files
authored
[OpenMP] Allow setting OPENMP_INSTALL_LIBDIR (#77533)
The comment indicate that it should be possible, but as long as it wasn't a cache variable, the cmake script overwrote whatever variable the user had set.
1 parent c69ec70 commit 14435a2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

openmp/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ if (OPENMP_STANDALONE_BUILD)
2929
set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
3030
"Suffix of lib installation directory, e.g. 64 => lib64")
3131
# Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
32-
set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}")
32+
set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}" CACHE STRING
33+
"Path where built OpenMP libraries should be installed.")
3334

3435
# Group test settings.
3536
set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING
@@ -46,7 +47,8 @@ if (OPENMP_STANDALONE_BUILD)
4647
else()
4748
set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
4849
# If building in tree, we honor the same install suffix LLVM uses.
49-
set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
50+
set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}" CACHE STRING
51+
"Path where built OpenMP libraries should be installed.")
5052

5153
if (NOT MSVC)
5254
set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)

0 commit comments

Comments
 (0)