aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2022-10-25 00:33:10 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2022-10-25 00:33:10 -0400
commitf28f138c997a944c4144de10046f15191ecd88d9 (patch)
treeadaf9a76202fa4b368a94ba51db97e73d9573da2
parentd05b24aca2ea509c5294c8b64ec9334abe68a8b6 (diff)
downloadsayeth-f28f138c997a944c4144de10046f15191ecd88d9.tar.gz
Introduce warnings and lower the cmake version requirements
-rw-r--r--CMakeLists.txt11
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)