diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-03-26 08:24:46 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-03-26 08:24:46 +0100 |
| commit | 83c08293b08cdc9b85a0206352da09c2039965cf (patch) | |
| tree | 8647caabd19d6467ed1a289420f03efd85e79d0a | |
| parent | bd2545347438f3aafc5cc2985c44d5da002c49c9 (diff) | |
improvements
| -rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b57ee49..93a0c61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,12 +19,12 @@ option(CM_ENABLE_SSE2 "Whether to enable SSE2 usage" OFF) ## source -set(cheesemap_source "${CMAKE_SOURCE_DIR}/cheesemap.c") +set(cheesemap_source "${CMAKE_CURRENT_SOURCE_DIR}/cheesemap.c") ## helper functions function(add_if_enabled target option_name) - if(NOT ${option_name}) + if(NOT DEFINED ${option_name} OR NOT ${option_name}) return() endif() @@ -47,14 +47,14 @@ endfunction() add_library(cheesemap OBJECT ${cheesemap_source}) +target_compile_features(cheesemap PUBLIC c_std_11) set_target_properties(cheesemap PROPERTIES - C_STANDARD 11 C_STANDARD_REQUIRED ON C_EXTENSIONS ON POSITION_INDEPENDENT_CODE ON ) -target_include_directories(cheesemap PUBLIC ${CMAKE_SOURCE_DIR}) +target_include_directories(cheesemap PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_compile_definitions(cheesemap PRIVATE CM_PANIC_SYM=${CM_PANIC_SYM}) target_compile_options(cheesemap PRIVATE -Wall -Wextra -Werror) |
