cnotes/CMakeLists.txt

28 lines
766 B
CMake
Raw Normal View History

2026-01-30 13:35:14 +00:00
cmake_minimum_required(VERSION 4.1)
project(cnotes C)
# Force strict C90/ANSI compliance
set(CMAKE_C_STANDARD 90)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
# Strict warning flags to match Makefile
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi -Wpedantic -Wall -Wextra")
include_directories(include)
# Platform-specific definitions for Unix (IDE/static analysis support)
# These match the defaults in platform.h for non-Windows/non-DOS builds
add_compile_definitions(
PATH_SEP_STR="/"
HOME_ENV="HOME"
CNOTES_PATH_ENV="CNOTES_PATH"
)
# Separate executables
add_executable(cnadd src/cnadd.c)
add_executable(cndump src/cndump.c)
add_executable(cncount src/cncount.c)
add_executable(cndel src/cndel.c)
2026-01-30 13:39:48 +00:00
add_executable(cnfind src/cnfind.c)