[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/11] build: start hooking up WITH_BORINGSSL
[Thread Prev] | [Thread Next]
- Subject: [PATCH 02/11] build: start hooking up WITH_BORINGSSL
- From: Jon Simons <jon@xxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Sat, 9 Sep 2017 20:12:45 -0700
- To: libssh@xxxxxxxxxx
- Cc: Jon Simons <jon@xxxxxxxxxxxxx>
Start hooking up WITH_BORINGSSL: remove flags for -pedantic and
-pedantic-errors so that the build can proceed past initial
includes of BoringSSL headers, some of which do not pass these
flags.
Signed-off-by: Jon Simons <jon@xxxxxxxxxxxxx>
---
CMakeLists.txt | 1 +
DefineOptions.cmake | 1 +
cmake/Modules/DefineCompilerFlags.cmake | 6 +++++-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30b1025c..69080658 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,6 +151,7 @@ message(STATUS "********** ${PROJECT_NAME} build options : **********")
message(STATUS "zlib support: ${WITH_ZLIB}")
message(STATUS "libgcrypt support: ${WITH_GCRYPT}")
message(STATUS "libnacl support: ${WITH_NACL}")
+message(STATUS "boringssl support: ${WITH_BORINGSSL}")
message(STATUS "SSH-1 support: ${WITH_SSH1}")
message(STATUS "SFTP support: ${WITH_SFTP}")
message(STATUS "Server support : ${WITH_SERVER}")
diff --git a/DefineOptions.cmake b/DefineOptions.cmake
index ab7819a5..0a4a49f2 100644
--- a/DefineOptions.cmake
+++ b/DefineOptions.cmake
@@ -19,6 +19,7 @@ if (WITH_ZLIB)
else (WITH_ZLIB)
set(WITH_LIBZ OFF)
endif (WITH_ZLIB)
+option(WITH_BORINGSSL "Compile against boringssl" OFF)
if(WITH_BENCHMARKS)
set(WITH_TESTING ON)
diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake
index bfbc38fc..b46c1189 100644
--- a/cmake/Modules/DefineCompilerFlags.cmake
+++ b/cmake/Modules/DefineCompilerFlags.cmake
@@ -10,7 +10,11 @@ if (UNIX AND NOT WIN32)
if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
# add -Wconversion ?
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors")
+ if (WITH_BORINGSSL)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+ else (WITH_BORINGSSL)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors")
+ endif (WITH_BORINGSSL)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute")
--
2.14.1
| [PATCH 00/11] libssh: enable building with BoringSSL | Jon Simons <jon@xxxxxxxxxxxxx> |