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

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2016-02-06 05:58:39 +0300
committerAdam Langley <agl@google.com>2016-02-08 21:12:36 +0300
commit6b34d549451ca98d1ab758bf509e2a03b4eedc4a (patch)
tree70225097971f8fddd727ce4515acf7ffb1490d2d
parent089cba090cae76d8c3c316bee5662cddc5395ca6 (diff)
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>
-rw-r--r--CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 19ee1ca0..84935598 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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