From 668cc496b6c218533e0ef768875bd4e4832ef40d Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Thu, 28 Apr 2022 13:24:46 +0200 Subject: [PATCH] update commandline, unused are now errors --- CMakeLists.txt | 9 +++++---- deps/commandline | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a36c83..e72a070 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,10 @@ if (MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") endif () +message(STATUS "Adding local source dependencies") +# this has to happen before -DDEBUG since it wont compile properly with -DDEBUG +add_subdirectory(deps) + message(STATUS "Setting compiler flags") if (WIN32) @@ -68,7 +72,7 @@ if (WIN32) include_directories(${VcpkgRoot}/include) link_directories(${VcpkgRoot}/lib) elseif (UNIX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -static-libstdc++") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -static-libstdc++ -Werror=unused") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-builtin") if (SANITIZE) @@ -78,9 +82,6 @@ elseif (UNIX) endif () -message(STATUS "Adding local source dependencies") -# this has to happen before -DDEBUG since it wont compile properly with -DDEBUG -add_subdirectory(deps) set(CMAKE_CXX_STANDARD 17) diff --git a/deps/commandline b/deps/commandline index 01434c1..d6b1c32 160000 --- a/deps/commandline +++ b/deps/commandline @@ -1 +1 @@ -Subproject commit 01434c11aaf82d37a126dc70f5aa02cc523dbbb4 +Subproject commit d6b1c32c8af6ad5306f9f001305b3be9928ae4bb