scsl/CMakeLists.txt

28 lines
653 B
CMake
Raw Normal View History

2023-10-06 03:13:46 +00:00
cmake_minimum_required(VERSION 3.25)
project(klib CXX)
set(CMAKE_CXX_STANDARD 14)
2023-10-06 06:08:35 +00:00
if(MSVC)
add_compile_options("/W4" "$<$<CONFIG:RELEASE>:/O2>")
else()
add_compile_options("-Wall" "-Wextra" "-Werror" "$<$<CONFIG:RELEASE>:-O3>")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options("-stdlib=libc++")
else()
# nothing special for gcc at the moment
endif()
endif()
add_compile_options("-DDESKTOP_BUILD")
2023-10-06 03:13:46 +00:00
add_library(klib STATIC
Arena.cc
2023-10-06 06:08:35 +00:00
TLV.cc
Phonebook.cc)
2023-10-06 03:13:46 +00:00
add_executable(tlv_test tlv_test.cc)
target_link_libraries(tlv_test klib)
2023-10-06 06:08:35 +00:00
add_executable(phonebook_test phonebook_test.cc)
target_link_libraries(phonebook_test klib)