diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2019-04-29 01:15:52 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2019-04-29 01:15:52 -0600 |
commit | ce593be031e4a5be18541d09512156be95e268fa (patch) | |
tree | 43752d8deefa7b798feed4ec76263a468254cbd1 | |
parent | 0781257b2a8d544abdcce38824a9b8288a04800d (diff) | |
download | mlir-toy-ce593be031e4a5be18541d09512156be95e268fa.tar.gz mlir-toy-ce593be031e4a5be18541d09512156be95e268fa.tar.bz2 mlir-toy-ce593be031e4a5be18541d09512156be95e268fa.zip |
-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}) |