File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -77,11 +77,6 @@ if (NOT LLVM_FOUND)
7777 set (LLVM_LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR} /lib${LLVM_LIBDIR_SUFFIX} )
7878endif ()
7979
80- # Setting these variables will allow the sub-build to put their outputs into
81- # the library and bin directories of the top-level build.
82- set (LLVM_LIBRARY_OUTPUT_INTDIR ${LLVM_LIBRARY_DIR} )
83- set (LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_TOOLS_BINARY_DIR} )
84-
8580# This variable makes sure that e.g. llvm-lit is found.
8681set (LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} /../llvm)
8782set (LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR} /cmake/modules)
@@ -99,6 +94,17 @@ if (LLVM_LIBRARY_OUTPUT_INTDIR AND LLVM_RUNTIME_OUTPUT_INTDIR AND PACKAGE_VERSIO
9994 set (LLVM_TREE_AVAILABLE ON )
10095endif ()
10196
97+ if (LLVM_TREE_AVAILABLE)
98+ # Setting these variables will allow the sub-build to put their outputs into
99+ # the library and bin directories of the top-level build.
100+ set (LLVM_LIBRARY_OUTPUT_INTDIR ${LLVM_LIBRARY_DIR} )
101+ set (LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_TOOLS_BINARY_DIR} )
102+ else ()
103+ # Use own build directory for artifact output.
104+ set (LLVM_LIBRARY_OUTPUT_INTDIR "${CMAKE_BINARY_DIR} /lib${LLVM_LIBDIR_SUFFIX} " )
105+ set (LLVM_RUNTIME_OUTPUT_INTDIR "${CMAKE_BINARY_DIR} /bin" )
106+ endif ()
107+
102108# CMake omits default compiler include paths, but in runtimes build, we use
103109# -nostdinc and -nostdinc++ and control include paths manually so this behavior
104110# is undesirable. Filtering CMAKE_{LANG}_IMPLICIT_INCLUDE_DIRECTORIES to remove
You can’t perform that action at this time.
0 commit comments