From c03d184a058b0f490ae06ce60f7b552a67c56494 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Fri, 21 Nov 2025 23:43:24 -0800 Subject: [PATCH] updating cmakelists --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4f6123..44aad3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,11 +4,15 @@ project(ke C) # Specify C language explicitly set(CMAKE_C_STANDARD 99) set(KE_VERSION "1.0.0") +set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEFAULT_SOURCE -D_XOPEN_SOURCE") + + # Add executable add_executable(ke main.c) # Define KE_VERSION for use in C code (e.g., #define KE_VERSION) -target_compile_definitions(ke PRIVATE KE_VERSION="${KE_VERSION}") +target_compile_definitions(ke PRIVATE KE_VERSION="ke version ${KE_VERSION}") # Set output properties set_target_properties(ke PROPERTIES