From f28f138c997a944c4144de10046f15191ecd88d9 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 25 Oct 2022 00:33:10 -0400 Subject: Introduce warnings and lower the cmake version requirements --- CMakeLists.txt | 11 +++++++++-- 1 file 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) -- cgit