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,12 @@ 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+ ],
2026 includes = ["include" ],
2127 local_defines = {
2228 "NCRYPTO_BSSL_LIBDECREPIT_MISSING" : select (
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ set(CMAKE_CXX_STANDARD 20)
99set (CMAKE_CXX_STANDARD_REQUIRED ON )
1010set (CMAKE_CXX_EXTENSIONS OFF )
1111
12+
13+
1214find_program (CCACHE_FOUND ccache )
1315if (CCACHE_FOUND)
1416 message (STATUS "Ccache found using it as compiler launcher." )
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 -Werror -Wextra -Wno-unused-parameter -Wimplicit-fallthrough )
6+ endif ()
7+ if (MSVC )
8+ target_compile_options (ncrypto PRIVATE /WX /W4 )
9+ endif ()
10+
211if (NCRYPTO_SHARED_LIBS)
312 target_link_libraries (ncrypto PUBLIC OpenSSL::SSL OpenSSL::Crypto )
413else ()
You can’t perform that action at this time.
0 commit comments