diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c084ae..e17aeb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,14 +11,15 @@ else() message(FATAL_ERROR "LLVM not found; it is derived from MLIR_INSTALL_PREFIX which has value of ${MLIR_INSTALL_PREFIX}") endif() -set (CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR};${CMAKE_MODULE_PATH}") +set(CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR};${CMAKE_MODULE_PATH}") +set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/lib) include(AddLLVM) function(whole_archive_link target) if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") set(link_flags "") FOREACH(LIB ${ARGN}) - string(CONCAT link_flags ${link_flags} "-Wl,-force_load ${CMAKE_BINARY_DIR}/lib/lib${LIB}.a ") + string(CONCAT link_flags ${link_flags} "-Wl,-force_load ${CMAKE_LIBRARY_OUTPUT_INTDIR}/lib${LIB}.a ") ENDFOREACH(LIB) else() set(link_flags "-Wl,--whole-archive,") @@ -38,7 +39,7 @@ include_directories( link_directories( ${LLVM_LIBRARY_DIR} - ${CMAKE_BINARY_DIR}) + ${LLVM_LIBRARY_OUTPUT_INTDIR}) add_definitions(${LLVM_DEFINITIONS}) |