mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Generate *.di only for druntime
This commit is contained 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",
|
||||
|
||||
@@ -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@/",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user