peaclock

A responsive and customizable clock, timer, and stopwatch for the terminal.


peaclock

/

CMakeLists.txt

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
cmake_minimum_required (VERSION 3.8 FATAL_ERROR)

set (TARGET "peaclock")
project (${TARGET})

find_program (CCACHE_FOUND ccache)
if (CCACHE_FOUND)
  message ("ccache found")
  set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
  set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif (CCACHE_FOUND)

set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED ON)

set (CMAKE_CXX_FLAGS "-std=c++17 -fdiagnostics-color=auto")

set (DEBUG_FLAGS "-g -Og -rdynamic -Wpedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused")
set (DEBUG_LINK_FLAGS "-fprofile-arcs -ftest-coverage")

set (RELEASE_FLAGS "-O3 -flto")
set (RELEASE_LINK_FLAGS "-O3 -flto -s")

set (CMAKE_CXX_FLAGS_DEBUG ${DEBUG_FLAGS})
set (CMAKE_EXE_LINKER_FLAGS_DEBUG ${DEBUG_LINK_FLAGS})

set (CMAKE_CXX_FLAGS_RELEASE ${RELEASE_FLAGS})
set (CMAKE_EXE_LINKER_FLAGS_RELEASE ${RELEASE_LINK_FLAGS})

message ("CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")

set (SOURCES
  src/main.cc
  src/ob/string.cc
  src/ob/readline.cc
  src/peaclock/tui.cc
  src/peaclock/peaclock.cc
)

add_executable (
  ${TARGET}
  ${SOURCES}
)

target_include_directories(
  ${TARGET}
  PRIVATE
  ./src
)

target_link_libraries (
  ${TARGET}
  pthread
  stdc++fs
  icuuc
  icui18n
)

install (TARGETS ${TARGET} DESTINATION bin)
Back to Top