move nix to nixos config
This commit is contained in:
@@ -2,15 +2,20 @@ cmake_minimum_required(VERSION 3.15)
|
|||||||
project(ke C) # Specify C language explicitly
|
project(ke C) # Specify C language explicitly
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
set(KE_VERSION "1.0.10")
|
set(KE_VERSION "1.0.11")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g")
|
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")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEFAULT_SOURCE -D_XOPEN_SOURCE")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# Add executable
|
# Add executable
|
||||||
add_executable(ke main.c)
|
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 ${KE_VERSION}")
|
target_compile_definitions(ke PRIVATE KE_VERSION="ke version ${KE_VERSION}")
|
||||||
|
install(TARGETS ke RUNTIME DESTINATION bin)
|
||||||
|
install(FILES ke.1 TYPE MAN)
|
||||||
|
|
||||||
|
install(TARGETS ke RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
install(FILES ke.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||||
|
|
||||||
|
|||||||
@@ -11,4 +11,8 @@ It should be available via homebrew, even:
|
|||||||
brew tap kisom/homebrew-tap
|
brew tap kisom/homebrew-tap
|
||||||
brew install ke
|
brew install ke
|
||||||
|
|
||||||
|
To get verbose ASAN messages:
|
||||||
|
|
||||||
|
export LSAN_OPTIONS=verbosity=1:log_threads=1
|
||||||
|
|
||||||
Released under an ISC license.
|
Released under an ISC license.
|
||||||
Reference in New Issue
Block a user