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

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Kent <wjk@users.noreply.github.com>2016-12-23 05:38:23 +0300
committerJan Kotas <jkotas@microsoft.com>2016-12-23 05:38:23 +0300
commit13f91678f78be4f391338e55851f7d3afc51562e (patch)
tree16863c078e59b9a8cf4f965d143e72a758c01add /src/Native/CMakeLists.txt
parentd2635386da1d4e3fff1bdfdd16b24523328afe05 (diff)
Enable build with Visual Studio 2017 (#2390)
* Add support for VS2017 in buildvars-setup.cmd * Add support for VS2017 in gen-buildsys-win.cmd * VS2017 rearranges some files, update build-native.cmd to match * Update minimum CMake version to 3.7.0 This version is the first version that supports generating a project using the Visual Studio 2017 toolchain. * Fix bug in gen-buildsys-win.bat The code previously assumed that the probe-win.ps1 script is located in the current working directory. During my testing, I found that this is not robust enough for all use-cases. Using %~dp0 to identify the directory containing the batch file is more robust against this issue. * Use the correct copy of MSBuild to build the C++ projects Only the copy of MSBuild shipped with VS2017 can successfully build VS2017 vcxproj files. Using any other copy will cause strange errors. * Update documentation * Use "rem" for comments instead of "::" The Windows batch file interpreter treats these two symbols differently. When "::" is used within an if block, it can create spurious drive-not-found errors. Using "rem" avoids this problem.
Diffstat (limited to 'src/Native/CMakeLists.txt')
-rw-r--r--src/Native/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Native/CMakeLists.txt b/src/Native/CMakeLists.txt
index 401318c8f..0ed106efb 100644
--- a/src/Native/CMakeLists.txt
+++ b/src/Native/CMakeLists.txt
@@ -4,6 +4,11 @@ project(CoreRT)
# Include cmake functions
include(functions.cmake)
+string(FIND ${CMAKE_GENERATOR} "Visual Studio 15 2017" VS2017_POS)
+if(VS2017_POS EQUAL 0 AND (CMAKE_VERSION VERSION_LESS 3.6.0))
+ message(FATAL_ERROR "CMake version 3.6.0 or higher is required to compile targeting VS 2017")
+endif()
+
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_INSTALL_PREFIX $ENV{__CMakeBinDir})
set(CMAKE_INCLUDE_CURRENT_DIR ON)