From 7af0ca755620cf9f689ab1ce53b941b89b30a5b5 Mon Sep 17 00:00:00 2001 From: Alonso Adrian Martinez Hernandez Date: Thu, 23 Apr 2026 12:09:07 -0600 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0281bc2..22947bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,13 +4,19 @@ project(arena VERSION 1.0 LANGUAGES C) set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) +# Opciones +option(ARENA_BUILD_TESTS "Build arena tests" OFF) +option(ARENA_ENABLE_SANITIZERS "Enable sanitizers for tests" ON) + +# Librería add_library(arena src/arena.c ) target_include_directories(arena PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include + $ + $ ) target_compile_options(arena PRIVATE @@ -20,8 +26,9 @@ target_compile_options(arena PRIVATE ) # ------------------------ -# Testing (opcional) +# Testing # ------------------------ - -enable_testing() -add_subdirectory(test) \ No newline at end of file +if(ARENA_BUILD_TESTS) + enable_testing() + add_subdirectory(test) +endif() \ No newline at end of file