Skip to content

Commit 7641d96

Browse files
committedJul 14, 2017
[CMake]Use LLVM_LIBRARY_DIR for lib path.
Summary: This makes sure the correct lib path is being used when `CMAKE_CFG_INTDIR` or `LLVM_LIBDIR_SUFFIX` is set. Reviewers: beanz Subscribers: mgorny, srhines, pirama, llvm-commits Differential Revision: https://reviews.llvm.org/D35318 llvm-svn: 307985
1 parent b069a36 commit 7641d96

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎llvm/runtimes/CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
3030
list(INSERT CMAKE_MODULE_PATH 0
3131
"${CMAKE_CURRENT_SOURCE_DIR}/../cmake"
3232
"${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules"
33-
"${LLVM_BINARY_DIR}/lib/cmake/llvm"
33+
"${LLVM_LIBRARY_DIR}/cmake/llvm"
3434
)
3535

3636
# Some of the runtimes will conditionally use the compiler-rt sanitizers
@@ -123,7 +123,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
123123
set(LLVM_RUNTIME_OUTPUT_INTDIR "${LLVM_TOOLS_BINARY_DIR}/${LLVM_RUNTIMES_TARGET}")
124124
endif()
125125
endif()
126-
126+
127127
# Between each sub-project we want to cache and clear the LIT properties
128128
set_property(GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
129129
set_property(GLOBAL PROPERTY LLVM_LIT_PARAMS)
@@ -154,7 +154,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
154154
if(LLVM_INCLUDE_TESTS)
155155
# Add a global check rule now that all subdirectories have been traversed
156156
# and we know the total set of lit testsuites.
157-
157+
158158
add_lit_target(check-runtimes
159159
"Running all regression tests"
160160
${RUNTIMES_LIT_TESTSUITES}
@@ -331,6 +331,7 @@ else() # if this is included from LLVM's CMake
331331
# Builtins were built separately above
332332
CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
333333
-DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
334+
-DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
334335
-DCMAKE_C_COMPILER_TARGET=${target}
335336
-DCMAKE_CXX_COMPILER_TARGET=${target}
336337
-DCMAKE_ASM_COMPILER_TARGET=${target}
@@ -376,6 +377,7 @@ else() # if this is included from LLVM's CMake
376377
# Builtins were built separately above
377378
CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
378379
-DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
380+
-DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
379381
PASSTHROUGH_PREFIXES ${prefixes}
380382
EXTRA_TARGETS ${extra_targets}
381383
${test_targets}

0 commit comments

Comments
 (0)
Please sign in to comment.