summaryrefslogtreecommitdiff
path: root/openmp/libompd
diff options
context:
space:
mode:
authorYe Luo <yeluo@anl.gov>2022-04-22 17:33:41 -0500
committerYe Luo <yeluo@anl.gov>2022-04-22 17:33:41 -0500
commit91ccd8248c85385a5654c63c302a37d97f811bab (patch)
tree2a9d634dde7b55d3ec2572a8db2507c71d69eaad /openmp/libompd
parent4b4437c084e2b8a2643e97e7aef125c438635a4d (diff)
downloadllvm-91ccd8248c85385a5654c63c302a37d97f811bab.tar.gz
[Clang][OpenMP] libompd: get libomp hwloc includedir by target_link_libraries
When hwloc is used and is installed outside of the default paths, the omp CMake target needs to provide the needed include path thru the CMake target by adding it with target_include_directories to it, so libompd gets it as well when it defines it's cmake target using target_link_libraries. As suggested in D122667 Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D123888
Diffstat (limited to 'openmp/libompd')
-rw-r--r--openmp/libompd/src/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/libompd/src/CMakeLists.txt b/openmp/libompd/src/CMakeLists.txt
index 25a850ed457d..f361fcf35a27 100644
--- a/openmp/libompd/src/CMakeLists.txt
+++ b/openmp/libompd/src/CMakeLists.txt
@@ -13,7 +13,7 @@ cmake_minimum_required(VERSION 3.13.4)
add_library (ompd SHARED TargetValue.cpp omp-debug.cpp omp-state.cpp omp-icv.cpp)
-add_dependencies(ompd omp) # ensure generated import library is created first
+target_link_libraries(ompd omp) # ensure generated import library is created first
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")