llvm.org GIT mirror llvm / 86453b7
[CMake] Set LLVM_PATH in the runtimes build This avoids using llvm-config for inferring various paths within the runtimes build. We also set LLVM_INCLUDE_DIR variable that's used by these builds and move assignment of LLVM_BINARY_DIR and LLVM_LIBRARY_DIR to the same location for consistency. Differential Revision: https://reviews.llvm.org/D62637 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362047 91177308-0d34-0410-b5e6-96231b3b80d8 Petr Hosek a month ago
1 changed file(s) with 6 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
8989 set(LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_TOOLS_BINARY_DIR})
9090
9191 # This variable makes sure that e.g. llvm-lit is found.
92 set(LLVM_BINARY_DIR ${LLVM_BUILD_BINARY_DIR})
93 set(LLVM_LIBRARY_DIR ${LLVM_BUILD_LIBRARY_DIR})
94 set(LLVM_INCLUDE_DIR ${LLVM_BUILD_MAIN_INCLUDE_DIR})
9295 set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR})
9396 set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules)
97
98 # This variable is used by individual runtimes to locate LLVM files.
99 set(LLVM_PATH ${LLVM_BUILD_MAIN_SRC_DIR})
94100
95101 if(APPLE)
96102 set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
374380 # Builtins were built separately above
375381 CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
376382 -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
377 -DLLVM_BINARY_DIR=${LLVM_BINARY_DIR}
378 -DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
379383 -DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_TRIPLE}
380384 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
381385 -DCMAKE_C_COMPILER_TARGET=${TARGET_TRIPLE}
465469 # Builtins were built separately above
466470 CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
467471 -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
468 -DLLVM_BINARY_DIR=${LLVM_BINARY_DIR}
469 -DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
470472 -DLLVM_DEFAULT_TARGET_TRIPLE=${target}
471473 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
472474 -DCMAKE_C_COMPILER_TARGET=${target}