Sun, 26 Sep 2021 17:58:27 +0200
add option to enable more warnings
CMakeLists.txt | file | annotate | diff | comparison | revisions |
--- a/CMakeLists.txt Sun Sep 26 16:12:25 2021 +0200 +++ b/CMakeLists.txt Sun Sep 26 17:58:27 2021 +0200 @@ -5,6 +5,11 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED 99) +option(GCC_MORE_WARNINGS "Enable -Wall -Wextra -pedantic when using gcc." OFF) +if (GCC_MORE_WARNINGS AND CMAKE_COMPILER_IS_GNUCC) + add_compile_options(-Wall -Wextra -pedantic) +endif() + # Library add_subdirectory(src)