else()
set(DEFINITION -D${DEFINITION})
endif()
- set(DEFINITIONS ${DEFINITIONS} ${DEFINITION})
+ list(APPEND DEFINITIONS ${DEFINITION})
endforeach()
set(${DefinitionName} ${DEFINITIONS} PARENT_SCOPE)
endfunction(get_compile_definitions)
function(get_include_directories IncludeDirectories)
get_directory_property(dirs INCLUDE_DIRECTORIES)
foreach(dir IN LISTS dirs)
- set(INC_DIRECTORIES ${INC_DIRECTORIES} -I${dir})
+ list(APPEND INC_DIRECTORIES -I${dir})
endforeach()
set(${IncludeDirectories} ${INC_DIRECTORIES} PARENT_SCOPE)
endfunction(get_include_directories)
function(convert_to_absolute_path RetSources)
set(Sources ${ARGN})
foreach(Source IN LISTS Sources)
- set(AbsolutePathSources ${AbsolutePathSources} ${CMAKE_CURRENT_SOURCE_DIR}/${Source})
+ list(APPEND AbsolutePathSources ${CMAKE_CURRENT_SOURCE_DIR}/${Source})
endforeach()
set(${RetSources} ${AbsolutePathSources} PARENT_SCOPE)
endfunction(convert_to_absolute_path)
disasmX86.cpp
)
-set(SOS_SOURCES ${SOS_SOURCES} ${SOS_SOURCES_AMD64})
+list(APPEND SOS_SOURCES ${SOS_SOURCES_AMD64})
add_definitions(-DFX_VER_INTERNALNAME_STR=SOS.dll)
#Preprocess exports definition file
preprocess_def_file(${CMAKE_CURRENT_SOURCE_DIR}/sos.def ${CMAKE_CURRENT_BINARY_DIR}/sos.def)
-set(SOS_SOURCES ${SOS_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/sos.def)
+list(APPEND SOS_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/sos.def)
set(SOS_LIBRARY
corguids
if(IS_64BIT_BUILD EQUAL 1)
include_directories(amd64)
- set(DACCESS_SOURCES
- ${DACCESS_SOURCES}
+ list(APPEND DACCESS_SOURCES
amd64/primitives.cpp
)
else()
- set(DACCESS_SOURCES
- ${DACCESS_SOURCES}
+ list(APPEND DACCESS_SOURCES
i386/primitives.cpp
)
endif(IS_64BIT_BUILD EQUAL 1)
)
if(WIN32)
- set(CORDBEE_SOURCES_WKS
- ${CORDBEE_SOURCES_WKS}
+ list(APPEND CORDBEE_SOURCES_WKS
# The following files need to be ported to Linux
inprocdac.cpp
dbgtransportproxy.cpp
endif(WIN32)
if (IS_64BIT_BUILD EQUAL 1)
- set(CORDBEE_SOURCES_WKS ${CORDBEE_SOURCES_WKS} amd64/amd64walker.cpp)
+ list(APPEND CORDBEE_SOURCES_WKS amd64/amd64walker.cpp)
else ()
- set(CORDBEE_SOURCES_WKS ${CORDBEE_SOURCES_WKS} i386/x86walker.cpp)
+ list(APPEND CORDBEE_SOURCES_WKS i386/x86walker.cpp)
endif (IS_64BIT_BUILD EQUAL 1)
convert_to_absolute_path(CORDBEE_SOURCES_DAC ${CORDBEE_SOURCES_DAC})
set(CORDBEE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(dac)
-add_subdirectory(wks)
\ No newline at end of file
+add_subdirectory(wks)
preprocess_def_file(${CMAKE_CURRENT_SOURCE_DIR}/dbgshim.ntdef ${CMAKE_CURRENT_BINARY_DIR}/dbgshim.def)
-set(DBGSHIM_SOURCES ${DBGSHIM_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/dbgshim.def)
+list(APPEND DBGSHIM_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/dbgshim.def)
add_library(dbgshim SHARED ${DBGSHIM_SOURCES})
add_definitions(-DFX_VER_INTERNALNAME_STR=mscordaccore.dll)
if(WIN32)
- set(CLR_DAC_SOURCES ${CLR_DAC_SOURCES}
+ list(APPEND CLR_DAC_SOURCES
Native.rc
)
set(DEF_SOURCES
${STATIC_MT_CRT_LIB}
)
else()
- set(COREDAC_LIBRARIES
- ${COREDAC_LIBRARIES}
+ list(APPEND COREDAC_LIBRARIES
palrt
)
endif(WIN32)
if(WIN32)
add_definitions(-DFX_VER_INTERNALNAME_STR=mscordbi.dll)
- set(MSCORDBI_SOURCES ${MSCORDBI_SOURCES}
+ list(APPEND MSCORDBI_SOURCES
Native.rc
)
preprocess_def_file(${DEF_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/mscordbi.def)
- set(MSCORDBI_SOURCES ${MSCORDBI_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/mscordbi.def)
+ list(APPEND MSCORDBI_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/mscordbi.def)
endif(WIN32)
add_library(mscordbi SHARED
)
if(WIN32)
- set(COREDBI_LIBRARIES
- ${COREDBI_LIBRARIES}
+ list(APPEND COREDBI_LIBRARIES
ipcmanager-staticcrt
mdhotdata-staticcrt
mdwinmd_dbi
target_link_libraries(mscordbi ${COREDBI_LIBRARIES})
elseif(CLR_CMAKE_PLATFORM_UNIX)
- set(COREDBI_LIBRARIES
- ${COREDBI_LIBRARIES}
+ list(APPEND COREDBI_LIBRARIES
mdhotdata_full
palrt
CoreClrPal
)
if(WIN32)
-set(CLR_SOURCES ${CLR_SOURCES}
+list(APPEND CLR_SOURCES
comcallunmarshal.cpp
delayload.cpp
Native.rc
)
convert_to_absolute_path(DEF_SOURCES ${DEF_SOURCES})
else()
-set(CLR_SOURCES ${CLR_SOURCES}
+list(APPEND CLR_SOURCES
unixinterface.cpp
)
endif(WIN32)
if (WIN32)
preprocess_def_file(${DEF_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def)
-set(CLR_SOURCES ${CLR_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def)
+list(APPEND CLR_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /ENTRY:CoreDllMain")
)
if(WIN32)
- set(CORECLR_LIBRARIES
- ${CORECLR_LIBRARIES}
+ list(APPEND CORECLR_LIBRARIES
mdwinmd_wks
comnls_wks
comcrypt_wks
RuntimeObject.lib
)
else()
- set(CORECLR_LIBRARIES
- ${CORECLR_LIBRARIES}
+ list(APPEND CORECLR_LIBRARIES
CoreClrPal
palrt
)
# Add dac table & debug resource to coreclr
get_include_directories(INC_DIR)
get_compile_definitions(PREPROCESS_DEFINITIONS)
- set(INC_DIR ${INC_DIR} -I${CLR_DIR}/src/vm -I${CLR_DIR}/src/vm/amd64 -I${CLR_DIR}/src/debug/ee -I${CLR_DIR}/src/gc)
- set(PREPROCESS_DEFINITIONS ${PREPROCESS_DEFINITIONS} -DDACCESS_COMPILE -DDBG_TARGET_64BIT=1 -DDBG_TARGET_WIN64=1 -DDBG_TARGET_AMD64=1)
+ list(APPEND INC_DIR -I${CLR_DIR}/src/vm -I${CLR_DIR}/src/vm/amd64 -I${CLR_DIR}/src/debug/ee -I${CLR_DIR}/src/gc)
+ list(APPEND PREPROCESS_DEFINITIONS -DDACCESS_COMPILE -DDBG_TARGET_64BIT=1 -DDBG_TARGET_WIN64=1 -DDBG_TARGET_AMD64=1)
add_custom_command(TARGET coreclr
POST_BUILD
COMMAND ${CMAKE_CXX_COMPILER} /P /EP /TP ${PREPROCESS_DEFINITIONS} ${INC_DIR} /Fi${CMAKE_CURRENT_BINARY_DIR}/daccess.i ${CLR_DIR}/src/debug/daccess/daccess.cpp
foreach(GENERATE_IDL IN LISTS CORGUIDS_IDL_SOURCES)
get_filename_component(IDLNAME ${GENERATE_IDL} NAME_WE)
set(OUT_NAME ${CMAKE_CURRENT_BINARY_DIR}/idls_out/${IDLNAME}_i.c)
- set(CORGUIDS_SOURCES ${CORGUIDS_SOURCES} ${OUT_NAME})
+ list(APPEND CORGUIDS_SOURCES ${OUT_NAME})
add_custom_command(OUTPUT ${OUT_NAME}
COMMAND ${MIDL} ${MIDL_INCLUDE_DIRECTORIES} /h ${CMAKE_CURRENT_BINARY_DIR}/idls_out/${IDLNAME}.h ${MIDL_DEFINITIONS} /out ${CMAKE_CURRENT_BINARY_DIR}/idls_out ${CMAKE_CURRENT_SOURCE_DIR}/${GENERATE_IDL}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${GENERATE_IDL}
foreach(IDL_SOURCE IN LISTS CORGUIDS_IDL_SOURCES)
get_filename_component(IDLNAME ${IDL_SOURCE} NAME_WE)
set(C_SOURCE ../pal/prebuilt/idl/${IDLNAME}_i.c)
- set(CORGUIDS_SOURCES ${CORGUIDS_SOURCES} ${C_SOURCE})
+ list(APPEND CORGUIDS_SOURCES ${C_SOURCE})
endforeach(IDL_SOURCE)
endif(WIN32)
# They should be moved out from here into the declaration
# of UTILCODE_SOURCES above after fixing compiler errors.
if(WIN32)
- set(UTILCODE_SOURCES
- ${UTILCODE_SOURCES}
+ list(APPEND UTILCODE_SOURCES
appxutil.cpp
dlwrap.cpp
downlevel.cpp
if(WIN32)
add_definitions(-D_CRTIMP=) # use static version of crt
- set(UTILCODE_SOURCES ${UTILCODE_SOURCES} ../hostimpl.cpp)
+ list(APPEND UTILCODE_SOURCES ../hostimpl.cpp)
add_library(utilcodestaticnohost STATIC ${UTILCODE_SOURCES})
elseif(CLR_CMAKE_PLATFORM_UNIX)
add_library(utilcodestaticnohost STATIC ${UTILCODE_SOURCES})
-endif(WIN32)
\ No newline at end of file
+endif(WIN32)
winrttypenameconverter.cpp
)
-set(VM_SOURCES_WKS
- ${VM_SOURCES_WKS}
+list(APPEND VM_SOURCES_WKS
${VM_SOURCES_DAC_AND_WKS_WIN32}
marvin32.cpp # move out of win32 when FEATURE_RANDOMIZED_STRING_HASHING is enabled for linux
# These should not be included for Linux
winrthelpers.cpp
)
-set(VM_SOURCES_DAC
- ${VM_SOURCES_DAC}
+list(APPEND VM_SOURCES_DAC
${VM_SOURCES_DAC_AND_WKS_WIN32}
# These should not be included for Linux
clrprivbinderwinrt.cpp
if(CLR_CMAKE_PLATFORM_UNIX)
-set(VM_SOURCES_WKS_AMD64
- ${VM_SOURCES_WKS_AMD64}
+list(APPEND VM_SOURCES_WKS_AMD64
${AMD64_SOURCES_DIR}/unixstubs.cpp
)
exceptionhandling.cpp
)
-set(VM_SOURCES_WKS
- ${VM_SOURCES_WKS}
+list(APPEND VM_SOURCES_WKS
${VM_SOURCES_WKS_AMD64}
${VM_SOURCES_DAC_AND_WKS_AMD64}
)
-set(VM_SOURCES_DAC
- ${VM_SOURCES_DAC}
+list(APPEND VM_SOURCES_DAC
${VM_SOURCES_DAC_AMD64}
${VM_SOURCES_DAC_AND_WKS_AMD64}
)
string(TOUPPER ${CMAKE_MATCH_1} CONFIG)
set(ASM_DEFINITIONS_${CONFIG} ${ASM_DEFINITIONS_${CONFIG}} ${CMAKE_MATCH_2})
else()
- set(ASM_DEFINITIONS ${ASM_DEFINITIONS} ${DEFINITION})
+ list(APPEND ASM_DEFINITIONS ${DEFINITION})
endif()
endforeach()