27 lines
730 B
CMake
27 lines
730 B
CMake
|
|
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)
|