PROPERTIES GENERATED TRUE)
endfunction()
+function(add_precompiled_header header cppFile targetSources)
+ if(MSVC)
+ set(precompiledBinary "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/stdafx.pch")
+
+ set_source_files_properties(${cppFile}
+ PROPERTIES COMPILE_FLAGS "/Yc\"${header}\" /Fp\"${precompiledBinary}\""
+ OBJECT_OUTPUTS "${precompiledBinary}")
+ set_source_files_properties(${${targetSources}}
+ PROPERTIES COMPILE_FLAGS "/Yu\"${header}\" /Fp\"${precompiledBinary}\""
+ OBJECT_DEPENDS "${precompiledBinary}")
+ # Add cppFile to SourcesVar
+ set(${targetSources} ${${targetSources}} ${cppFile} PARENT_SCOPE)
+ endif(MSVC)
+endfunction()
# Includes
convert_to_absolute_path(DACCESS_SOURCES ${DACCESS_SOURCES})
+add_precompiled_header(stdafx.h stdafx.cpp DACCESS_SOURCES)
+
add_library(daccess ${DACCESS_SOURCES})
endif(WIN32)
-
+add_precompiled_header(stdafx.h stdafx.cpp CORDBDI_SOURCES)
add_library(cordbdi STATIC ${CORDBDI_SOURCES})
\ No newline at end of file
include(${CLR_DIR}/dac.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp CORDBEE_SOURCES_DAC)
+
add_library(cordbee_dac ${CORDBEE_SOURCES_DAC})
if (WIN32)
+add_precompiled_header(stdafx.h ../stdafx.cpp CORDBEE_SOURCES_WKS)
+
if (IS_64BIT_BUILD EQUAL 1)
FIND_PROGRAM(ASM_COMPILER ml64.exe)
else ()
)
if(WIN32)
+ add_precompiled_header(stdafx.h stdafx.cpp MSCORDBI_SOURCES)
+
add_definitions(-DFX_VER_INTERNALNAME_STR=mscordbi.dll)
list(APPEND MSCORDBI_SOURCES
add_definitions(-D_CRTIMP=) #static link of crt
+add_precompiled_header(stdafx.h ../stdafx.cpp IPCMAN_SOURCES)
add_library(ipcmanager-staticcrt STATIC ${IPCMAN_SOURCES})
\ No newline at end of file
)
if( WIN32 )
+
+ add_precompiled_header(jitpch.h jitpch.cpp SOURCES)
+
# Create .def file containing a list of exports preceeded by
# 'EXPORTS'. The file "ClrJit.exports" already contains the list, so we
# massage it into the correct format here to create "ClrJit.exports.def".
add_compile_options(-fPIC)
endif(CLR_CMAKE_PLATFORM_UNIX)
+add_precompiled_header(stdafx.h stdafx.cpp CEEFILEGEN_SOURCES)
+
add_library(ceefgen
STATIC
${CEEFILEGEN_SOURCES}
include(${CLR_DIR}/dac.cmake)
include(../../md_dac.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES)
add_library(mdcompiler_dac ${MDCOMPILER_SOURCES})
include(../../md_dbi.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES)
add_library(mdcompiler-dbi ${MDCOMPILER_SOURCES})
\ No newline at end of file
include(../../md_wks.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES)
add_library(mdcompiler_wks ${MDCOMPILER_SOURCES})
\ No newline at end of file
include(../../md_dbi.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDDATASOURCE_SOURCES)
add_library(mddatasource_dbi STATIC ${MDDATASOURCE_SOURCES})
\ No newline at end of file
include(${CLR_DIR}/dac.cmake)
include(../../md_dac.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES)
add_library(mdruntimerw_dac ${MDRUNTIMERW_SOURCES})
include(../../md_dbi.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES)
add_library(mdruntimerw-dbi ${MDRUNTIMERW_SOURCES})
\ No newline at end of file
include(../../md_wks.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES)
add_library(mdruntimerw_wks ${MDRUNTIMERW_SOURCES})
include(${CLR_DIR}/dac.cmake)
+add_precompiled_header(external.h ../external.cpp MDHOTDATA_SOURCES)
+
add_library(mdhotdata_dac ${MDHOTDATA_SOURCES})
add_definitions(-D_CRTIMP=) # static link of crt
+
+add_precompiled_header(external.h ../external.cpp MDHOTDATA_SOURCES)
add_library(mdhotdata-staticcrt ${MDHOTDATA_SOURCES})
+add_precompiled_header(external.h ../external.cpp MDHOTDATA_SOURCES)
+
add_library(mdhotdata_full ${MDHOTDATA_SOURCES})
include(${CLR_DIR}/dac.cmake)
include(../../md_dac.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES)
+
add_library(mdruntime_dac ${MDRUNTIME_SOURCES})
\ No newline at end of file
include(../../md_dbi.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES)
add_library(mdruntime-dbi ${MDRUNTIME_SOURCES})
\ No newline at end of file
include(../../md_wks.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES)
add_library(mdruntime_wks ${MDRUNTIME_SOURCES})
include(${CLR_DIR}/dac.cmake)
include(../../md_dbi.cmake)
+add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES)
add_library(mdwinmd_dac ${MDWINMD_SOURCES})
include(../../md_dbi.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES)
add_library(mdwinmd_dbi ${MDWINMD_SOURCES})
\ No newline at end of file
include(../../md_wks.cmake)
+
+add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES)
add_library(mdwinmd_wks ${MDWINMD_SOURCES})
\ No newline at end of file
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
+#include "stdafx.h"
#include "cycletimer.h"
#include "winbase.h"
add_dependencies(utilcode_dac CoreClrPal)
else()
add_definitions(-DSELF_NO_HOST)
- add_library(utilcode_dac STATIC ${UTILCODE_SOURCES} ../hostimpl.cpp)
+ list(APPEND UTILCODE_SOURCES ../hostimpl.cpp)
+ add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_SOURCES)
+ add_library(utilcode_dac STATIC ${UTILCODE_SOURCES})
endif(CLR_CMAKE_PLATFORM_UNIX)
\ No newline at end of file
add_library(utilcode STATIC ${UTILCODE_SOURCES})
add_dependencies(utilcode CoreClrPal)
else()
+ add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_SOURCES)
add_library(utilcode STATIC ${UTILCODE_SOURCES})
endif(CLR_CMAKE_PLATFORM_UNIX)
\ No newline at end of file
// LazyCOW.cpp
//
+#include "stdafx.h"
+
#include "pedecoder.h"
#include "volatile.h"
#include "lazycow.h"
add_definitions(-D_CRTIMP=) # use static version of crt
list(APPEND UTILCODE_SOURCES ../hostimpl.cpp)
-
+ add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_SOURCES)
add_library(utilcodestaticnohost STATIC ${UTILCODE_SOURCES})
elseif(CLR_CMAKE_PLATFORM_UNIX)
add_library(utilcodestaticnohost STATIC ${UTILCODE_SOURCES})
include(${CLR_DIR}/dac.cmake)
+add_precompiled_header(common.h ../common.cpp VM_SOURCES_DAC)
add_library(cee_dac ${VM_SOURCES_DAC})
\ No newline at end of file
+if (WIN32)
+ add_precompiled_header(common.h ../common.cpp VM_SOURCES_WKS)
+ # mscorlib.cpp does not compile with precompiled header file
+ set_source_files_properties(../mscorlib.cpp PROPERTIES COMPILE_FLAGS "/Y-")
+ # .c file cannot use cpp precompiled header
+ set_source_files_properties(../microsoft.comservices_i.c PROPERTIES COMPILE_FLAGS "/Y-")
+endif (WIN32)
+
add_library(cee_wks ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_AMD64_ASM})
if (WIN32)
-
# Get the current list of definitions
get_compile_definitions(DEFINITIONS)