CMake - Compiler Warnings
Last updated on
I’m a fan of extra warnings and warnings as errors. Here is the CMake todo this
if(MSVC)
target_compile_options(
target
/W4
/WX)
else()
target_compile_options(
target
-Wall
-Wextra
-pedantic
-Werror)
endif()