From 058e2df074eb6d9cf4746cad6314b7994c384cef Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Sat, 26 Mar 2011 17:58:08 +0300 Subject: [PATCH] Generate *.di only for druntime --- ldc2.conf.in | 1 + ldc2_phobos.conf.in | 1 + runtime/CMakeLists.txt | 19 ++++++++----------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ldc2.conf.in b/ldc2.conf.in index 2b0a4039..09cd5b1d 100644 --- a/ldc2.conf.in +++ b/ldc2.conf.in @@ -7,6 +7,7 @@ default: // 'switches' holds array of string that are appends to the command line // arguments before they are parsed. switches = [ + "-I@PROJECT_BINARY_DIR@/../import", "-I@RUNTIME_DIR@/import", "-I@RUNTIME_DIR@/src", "-L-L@PROJECT_BINARY_DIR@/../lib", diff --git a/ldc2_phobos.conf.in b/ldc2_phobos.conf.in index b303ef26..0a3df63f 100644 --- a/ldc2_phobos.conf.in +++ b/ldc2_phobos.conf.in @@ -7,6 +7,7 @@ default: // 'switches' holds array of string that are appends to the command line // arguments before they are parsed. switches = [ + "-I@PROJECT_BINARY_DIR@/../import", "-I@RUNTIME_DIR@/import", "-I@RUNTIME_DIR@/src", "-I@PHOBOS2_DIR@/", diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 6cb82f32..5dfa4b48 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -101,15 +101,11 @@ elseif(D_VERSION EQUAL 2) elseif(APPLE) file(GLOB_RECURSE CORE_D_SYS ${RUNTIME_DIR}/src/core/sys/osx/*.d) endif(UNIX) - list(APPEND CORE_D ${CORE_D_SYNC} ${CORE_D_SYS} ${CORE_D_STDC} ${LDC_D} - ${RUNTIME_DIR}/src/object_.d - ) + list(APPEND CORE_D ${CORE_D_SYNC} ${CORE_D_SYS} ${CORE_D_STDC} ) + set(GENERATE_DI ${CORE_D}) + list(APPEND CORE_D ${LDC_D} ${RUNTIME_DIR}/src/object_.d) file(GLOB CORE_C ${RUNTIME_DIR}/src/core/stdc/*.c) - set(IGNORE_DI - ${RUNTIME_DIR}/src/object_.d - ) - if(PHOBOS2_DIR) file(GLOB PHOBOS2_D ${PHOBOS2_DIR}/std/*.d) file(GLOB PHOBOS2_D_MATH ${PHOBOS2_DIR}/std/internal/math/*.d) @@ -205,12 +201,13 @@ macro(dc INPUT_D OUTLIST_O OUTLIST_BC INCDIR MOREFLAGS PATH) list(APPEND ${OUTLIST_O} ${OUTPUT_O}) list(APPEND ${OUTLIST_BC} ${OUTPUT_BC}) - list(FIND IGNORE_DI "${INPUT_D}" INDEX) + list(FIND GENERATE_DI "${INPUT_D}" INDEX) if (INDEX EQUAL -1) - string(REGEX REPLACE "^src/" "druntime/" di_output ${output}) - set(DI_CMD -Hf=${CMAKE_BINARY_DIR}/import/${di_output}.di) + set(DI_CMD "") else (INDEX EQUAL -1) - list(REMOVE_AT IGNORE_DI ${INDEX}) + string(REGEX REPLACE "^src/" "" di_output ${output}) + set(DI_CMD -Hf=${CMAKE_BINARY_DIR}/import/${di_output}.di) + list(REMOVE_AT GENERATE_DI ${INDEX}) endif (INDEX EQUAL -1) # Compile