diff options
Diffstat (limited to 'openmp/CMakeLists.txt')
-rw-r--r-- | openmp/CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt index 03068af..3c4ff76 100644 --- a/openmp/CMakeLists.txt +++ b/openmp/CMakeLists.txt @@ -46,9 +46,15 @@ if (OPENMP_STANDALONE_BUILD) set(CMAKE_CXX_EXTENSIONS NO) else() set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR}) - # If building in tree, we honor the same install suffix LLVM uses. - set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}" CACHE STRING - "Path where built OpenMP libraries should be installed.") + + # When building in tree we install the runtime according to the LLVM settings. + if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(OPENMP_INSTALL_LIBDIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE STRING + "Path where built openmp libraries should be installed.") + else() + set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}" CACHE STRING + "Path where built OpenMP libraries should be installed.") + endif() if (NOT MSVC) set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang) |