diff options
author | Jan Kotas <jkotas@microsoft.com> | 2015-11-11 17:04:37 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2015-11-11 19:50:35 +0300 |
commit | b5aabefef062c327cf65cb3a20c730ff82667825 (patch) | |
tree | 4967e85aca36c313b8f8e785c7c9e4c33683c382 /src/Native/Runtime/Full | |
parent | 26e0c761cef1abb6a66f9ea77e9cadd7d0673ae2 (diff) |
Add Runtime.Base.dll to the build
- Most of the .csproj file plumbing is copied from System.Private.CoreLib.dll
- Runtime.Base.dll build depends on AsmOffsets.h run through C++ preprocessor produced during CMake step of the build
Diffstat (limited to 'src/Native/Runtime/Full')
-rw-r--r-- | src/Native/Runtime/Full/CMakeLists.txt | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/Native/Runtime/Full/CMakeLists.txt b/src/Native/Runtime/Full/CMakeLists.txt index 70ba8540d..9f371d930 100644 --- a/src/Native/Runtime/Full/CMakeLists.txt +++ b/src/Native/Runtime/Full/CMakeLists.txt @@ -12,9 +12,25 @@ add_definitions(-DUSE_PORTABLE_HELPERS) add_library(Runtime STATIC ${COMMON_RUNTIME_SOURCES} ${FULL_RUNTIME_SOURCES} ${RUNTIME_SOURCES_ARCH_ASM}) +# Get the current list of definitions +get_compile_definitions(DEFINITIONS) + +set(ASM_OFFSETS_CSPP ${RUNTIME_DIR}/../../Runtime.Base/src/AsmOffsets.cspp) + +add_custom_command( + # The AsmOffsets.cs is consumed later by the managed build + TARGET Runtime + COMMAND ${CMAKE_CXX_COMPILER} ${DEFINITIONS} -E "${ASM_OFFSETS_CSPP}" >"${CMAKE_CURRENT_BINARY_DIR}/AsmOffsets.cs" + DEPENDS "${RUNTIME_DIR}/AsmOffsets.cpp" "${RUNTIME_DIR}/AsmOffsets.h" +) + if (WIN32) - # Get the current list of definitions - get_compile_definitions(DEFINITIONS) + add_custom_command( + # The AsmOffsets.inc will be built in the pre-build phase of the Runtime build + TARGET Runtime PRE_BUILD + COMMAND ${CMAKE_CXX_COMPILER} ${DEFINITIONS} -EP "${RUNTIME_DIR}/AsmOffsets.cpp" >"${CMAKE_CURRENT_BINARY_DIR}/AsmOffsets.inc" + DEPENDS "${RUNTIME_DIR}/AsmOffsets.cpp" "${RUNTIME_DIR}/AsmOffsets.h" + ) # Extract the definitions for the ASM code. Since there is a bug in the cmake that prevents us from # using the generator expressions, we split the definitions into lists based on the configuration. @@ -36,12 +52,6 @@ if (WIN32) string(TOUPPER ${CONFIG} CONFIG) set_property(SOURCE ${RUNTIME_SOURCES_ARCH_ASM} PROPERTY COMPILE_DEFINITIONS_${CONFIG} ${ASM_DEFINITIONS_${CONFIG}}) endforeach() - - add_custom_command( - # The AsmOffsets.inc will be built in the pre-build phase of the Runtime build - TARGET Runtime PRE_BUILD - COMMAND ${CMAKE_CXX_COMPILER} ${DEFINITIONS} /EP "${RUNTIME_DIR}/AsmOffsets.cpp" >"${CMAKE_CURRENT_BINARY_DIR}/AsmOffsets.inc" - ) endif() # Install the static Runtime library |