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 <jkoritzinsky@gmail.com>2019-05-30 00:40:31 +0300
committerGitHub <noreply@github.com>2019-05-30 00:40:31 +0300
commit1259a27d1f9c18e071b27a88834f21c6c4551fa2 (patch)
tree078ba1188fb948094186fe4224b37dcb352db56b /src/coreclr/CMakeLists.txt
parent9d9eddc18d3bc722bb306f4bc01bfe2535965e15 (diff)
Refactor native build to remove the compiler-override files (dotnet/coreclr#23897)
* On systems that have both cmake 2 and cmake 3, use cmake 3. Move CMAKE_EXPORT_COMPILE_COMMANDS to top level instead of in gen-buildsys-*. Define the CMake install prefix in gen-buildsys-* instead of pulling from an environment variable. Define C++ standard as CMake property instead of as flag. Move CLR_DEFINES_*_INIT out of overrides and into configurecompiler.cmake Move flags that generate debug info into configurecompiler.cmake Remove the CMAKE_USER_RULES_OVERRIDE files. Add cmake version output for determining what cmake versions each CI system has. Fix syntax in gen-buildsys-clang. Change add_compile_definitions back to add_definitions Add -D prefix for adding definitions via add_definitions Remove extraneous double-quote Change default config definition adding to the syntax in master Switch back to old CMAKE_<LANG>_FLAGS way of setting the language standards and try to go back to 2.8.12 minimum Switch back setting compile definitions for non-Windows branch too. Use SET with CMAKE_<LANG>_FLAGS. Convert some usages of appending to CMAKE_<LANG>_FLAGS to add_compile_options where possible. Set CMAKE_<LANG>_FLAGS_INIT instead of CMAKE_<LANG>_FLAGS Make sure configureopimitzation.cmake is included correctly in test build. Try to add brackets to get the Linux ARM compilation working correctly. Define standard language version in configurecompiler.cmake instead of root CMakeLists (so tests get it) Try to move langauge standard check to configure.cmake define language standard in each root CMakeLists.txt Fix off-Windows test build. Set CMAKE_EXPORT_COMPILE_COMMANDS after the project() call * Set CMAKE_USER_MAKE_RULES_OVERRIDE to "" to not break incremental builds after building on a branch that had it set to a path. * Remove CMake version output. * Move comment outside of multiline command. * Retry setting CMAKE_USER_MAKE_RULES_OVERRIDE * Remove unnecessary variable wrappers. * Simplify cmake 3 resolution. * Explicitly use CMAKE_CXX_FLAGS for C++-only flags that GCC complains about on C files. * Set -Wall via CMAKE_<LANG>_FLAGS until we can move all flag settings to add_compile_options * Fix typos * Another temporary precedence issue. * include configureoptimization.cmake in configurecompiler.cmake * Move setting CMAKE_EXPORT_COMPILE_COMMANDS to configurecompiler.cmake. * Rename configure.cmake -> verify_lto.cmake. * Fix path to verify-lto * Try using CMAKE_<LANG>_FLAGS instead of CMAKE_<LANG>_FLAGS_INIT. * Revert name change to configure.camek Commit migrated from https://github.com/dotnet/coreclr/commit/38f121b06910b25080b5f3259152effc0fe3c672
Diffstat (limited to 'src/coreclr/CMakeLists.txt')
-rw-r--r--src/coreclr/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt
index 7d6ba418c15..ca5a69b544c 100644
--- a/src/coreclr/CMakeLists.txt
+++ b/src/coreclr/CMakeLists.txt
@@ -5,13 +5,18 @@ if(CMAKE_VERSION VERSION_EQUAL 3.0 OR CMAKE_VERSION VERSION_GREATER 3.0)
cmake_policy(SET CMP0042 NEW)
endif()
+if (NOT WIN32)
+ set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} -std=c++11" CACHE STRING "Flags used by the compiler during all build types.")
+ set(CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS_INIT} -std=c11" CACHE STRING "Flags used by the compiler during all build types.")
+endif()
+
# Set the project name
project(CoreCLR)
# Include cmake functions
include(functions.cmake)
-# Include global configure settings
+# Verify that LTCG/LTO is available
include(configure.cmake)
if (WIN32)