update commandline, unused are now errors

This commit is contained in:
Lion Kortlepel 2022-04-28 13:24:46 +02:00
parent 056d20292a
commit 668cc496b6
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B
2 changed files with 6 additions and 5 deletions

View File

@ -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)

2
deps/commandline vendored

@ -1 +1 @@
Subproject commit 01434c11aaf82d37a126dc70f5aa02cc523dbbb4
Subproject commit d6b1c32c8af6ad5306f9f001305b3be9928ae4bb