Prefer MSVC over GCC if both are in %PATH%.
Notably, putting Strawberry Perl in %PATH% will usually end up putting a copy of gcc in %PATH%, which trips up people trying to build on Windows. This is arguably misusing the variable (normally set by the generator), but it should work. Change-Id: I13a011eb33688ae928a56cce266edd2759a3cb32 Reviewed-on: https://boringssl-review.googlesource.com/7070 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
089cba090c
commit
6b34d54945
@ -1,6 +1,16 @@
|
||||
cmake_minimum_required (VERSION 2.8.10)
|
||||
|
||||
project (BoringSSL)
|
||||
# Defer enabling C and CXX languages.
|
||||
project (BoringSSL NONE)
|
||||
|
||||
if(WIN32)
|
||||
# On Windows, prefer cl over gcc if both are available. By default most of
|
||||
# the CMake generators prefer gcc, even on Windows.
|
||||
set(CMAKE_GENERATOR_CC cl)
|
||||
endif()
|
||||
|
||||
enable_language(C)
|
||||
enable_language(CXX)
|
||||
|
||||
if(ANDROID)
|
||||
# Android-NDK CMake files reconfigure the path and so Go and Perl won't be
|
||||
|
Loading…
Reference in New Issue
Block a user