Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Koritzinsky <jekoritz@microsoft.com>2021-04-05 19:28:04 +0300
committerGitHub <noreply@github.com>2021-04-05 19:28:04 +0300
commit8c2158f9fe12c82cd3c0a7f4150773654bc78aaf (patch)
tree44c037075204154c3e9c841177b2eae1b4177e59 /src/coreclr/CMakeLists.txt
parentb7a164882573af99eaf200c4b21808ecaf6dbb8c (diff)
Make Ninja the default CMake generator on Windows for the repo (#49715)
Co-authored-by: Juan Hoyos <juan.hoyos@microsoft.com>
Diffstat (limited to 'src/coreclr/CMakeLists.txt')
-rw-r--r--src/coreclr/CMakeLists.txt21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt
index 7e9c6b8a656..8dc3564a781 100644
--- a/src/coreclr/CMakeLists.txt
+++ b/src/coreclr/CMakeLists.txt
@@ -12,8 +12,6 @@ include(../../eng/native/configurepaths.cmake)
include(${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake)
if(MSVC)
- string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/EHa>) # enable C++ EH (w/ SEH exceptions)
set(CMAKE_CXX_STANDARD_LIBRARIES "") # do not link against standard win32 libs i.e. kernel32, uuid, user32, etc.
endif (MSVC)
@@ -48,6 +46,21 @@ endif(CLR_CROSS_COMPONENTS_BUILD)
#-------------------
include(pgosupport.cmake)
+#---------------------------
+# Build the single file host
+#---------------------------
+if(CLR_CMAKE_BUILD_SUBSET_RUNTIME AND NOT CLR_CROSS_COMPONENTS_BUILD)
+ add_subdirectory(${CLR_SRC_NATIVE_DIR}/corehost/apphost/static Corehost.Static)
+endif()
+
+#-------------------------
+# Enable C++ EH with SEH
+#-------------------------
+if (MSVC)
+ string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/EHa>) # enable C++ EH (w/ SEH exceptions)
+endif()
+
#-------------------------------
# Include libraries native shims
#-------------------------------
@@ -130,10 +143,6 @@ if(FEATURE_STANDALONE_GC)
endif (CLR_CMAKE_BUILD_SUBSET_RUNTIME)
endif(FEATURE_STANDALONE_GC)
-if(CLR_CMAKE_BUILD_SUBSET_RUNTIME AND NOT CLR_CROSS_COMPONENTS_BUILD)
- add_subdirectory(${CLR_SRC_NATIVE_DIR}/corehost/apphost/static Corehost.Static)
-endif()
-
if (CLR_CMAKE_HOST_UNIX)
include_directories("pal/inc")
include_directories("pal/inc/rt")