File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,13 @@ cc_library(
1717 name = "ncrypto" ,
1818 srcs = glob (["src/*.cpp" ]),
1919 hdrs = glob (["include/*.h" , "include/ncrypto/*.h" ]),
20+ copts = [
21+ "-Werror" ,
22+ "-Wextra" ,
23+ "-Wno-unused-parameter" ,
24+ "-Wimplicit-fallthrough" ,
25+ "-Wno-deprecated-declarations" , # OpenSSL 3.0 deprecates many APIs we intentionally use
26+ ],
2027 includes = ["include" ],
2128 local_defines = {
2229 "NCRYPTO_BSSL_LIBDECREPIT_MISSING" : select (
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class Aead final {
1919
2020 public:
2121 Aead () = default ;
22- Aead (const AeadInfo* info, const EVP_AEAD* aead) : info_(info ), aead_(aead ) {}
22+ Aead (const AeadInfo* info, const EVP_AEAD* aead) : aead_(aead ), info_(info ) {}
2323 Aead (const Aead&) = default ;
2424 Aead& operator =(const Aead&) = default ;
2525 NCRYPTO_DISALLOW_MOVE (Aead)
Original file line number Diff line number Diff line change 11add_library (ncrypto ncrypto.cpp engine.cpp aead.cpp )
2+
3+ # Enable strict warning flags for ncrypto sources only
4+ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang" )
5+ target_compile_options (ncrypto PRIVATE
6+ -Werror
7+ -Wextra
8+ -Wno-unused-parameter
9+ -Wimplicit-fallthrough
10+ -Wno-deprecated-declarations # OpenSSL 3.0 deprecates many APIs we intentionally use
11+ )
12+ endif ()
13+ if (MSVC )
14+ target_compile_options (ncrypto PRIVATE /WX /W4 )
15+ endif ()
16+
217if (NCRYPTO_SHARED_LIBS)
318 target_link_libraries (ncrypto PUBLIC OpenSSL::SSL OpenSSL::Crypto )
419else ()
You can’t perform that action at this time.
0 commit comments