diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2022-10-25 00:33:10 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2022-10-25 00:33:10 -0400 |
commit | f28f138c997a944c4144de10046f15191ecd88d9 (patch) | |
tree | adaf9a76202fa4b368a94ba51db97e73d9573da2 | |
parent | d05b24aca2ea509c5294c8b64ec9334abe68a8b6 (diff) | |
download | sayeth-f28f138c997a944c4144de10046f15191ecd88d9.tar.gz |
Introduce warnings and lower the cmake version requirements
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 819e8d1..673e65d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,16 @@ -cmake_minimum_required(VERSION 3.23) +cmake_minimum_required(VERSION 3.17) project(sayeth C) set(CMAKE_C_STANDARD 99) +if (MSVC) + # warning level 4 and all warnings as errors + add_compile_options(/W4 /WX) +else() + # lots of warnings and all warnings as errors + add_compile_options(-Wall -Wextra -pedantic -Werror) +endif() -add_executable(sayeth main.c) +add_executable(sayeth main.c driver.c draw.c) set(DRIVER_DIR ${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}) option(DEV_ENABLE "Developer mode" OFF) |