From 79e0b53fe7f3406ad2fa5bb9a0845ba2fcef94d5 Mon Sep 17 00:00:00 2001 From: kai Date: Mon, 15 Oct 2012 18:32:01 +0200 Subject: [PATCH] Retrieve location of gen_gccbuiltins from CMake. This is required for the MSVC build because binaries are placed in a Debug or Release folder. --- CMakeLists.txt | 1 + runtime/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 08a64e8f..ccdbb670 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -303,6 +303,7 @@ target_link_libraries(gen_gccbuiltins "-lLLVMTableGen -lLLVMSupport -ldl ${LLVM_ # For use by the druntime/Phobos build system. get_target_property(LDC_LOC ${LDC_EXE} LOCATION) +get_target_property(GEN_GCCBUILTINS_LOC gen_gccbuiltins LOCATION) # # LDMD diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 97e1545a..9af26806 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -268,8 +268,8 @@ macro(build_runtime d_flags c_flags ld_flags lib_suffix path_suffix) set(GCCBUILTINS "${PROJECT_BINARY_DIR}/gccbuiltins_x86.di") add_custom_command( OUTPUT ${GCCBUILTINS} - COMMAND ${PROJECT_BINARY_DIR}/../bin/gen_gccbuiltins ${GCCBUILTINS} "x86" - DEPENDS ${PROJECT_BINARY_DIR}/../bin/gen_gccbuiltins + COMMAND ${GEN_GCCBUILTINS_LOC} ${GCCBUILTINS} "x86" + DEPENDS ${GEN_GCCBUILTINS_LOC} ) if(BUILD_SINGLE_LIB) add_library(${RUNTIME_AIO}${target_suffix}