Adding more flags.

This commit is contained in:
Daniel Lemire 2020-10-01 09:48:36 -04:00
parent 957fb0c7db
commit 894cebfb2b
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wshadow")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wshadow -Weffc++ -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion")
endif()
add_library(cxxopts INTERFACE)

View File

@ -36,7 +36,7 @@ class Argv {
private:
std::vector<std::unique_ptr<char[]>> m_args;
std::vector<std::unique_ptr<char[]>> m_args{};
std::unique_ptr<const char*[]> m_argv;
int m_argc;
};