This repository has been archived on 2021-04-17. You can view files and clone it, but cannot push or open issues or pull requests.
uIRC/CMakeLists.txt

32 lines
1.1 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.16)
project(microirc LANGUAGES C)
2020-07-21 13:01:06 +00:00
# NOTE: Do these seem too annoying? Try writing good code then.
# Code that triggers these warnings will not be accepted unless it has a good reason to trigger them.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Werror -Wformat-overflow=2 -Wformat-security -Winit-self -Wstrict-overflow=2 -Wstringop-overflow=2 -Walloc-zero -Wduplicated-branches -Wduplicated-cond -Wtrampolines -Wfloat-equal -Wshadow -Wunsafe-loop-optimizations -Wparentheses -fanalyzer -fstack-protector")
2020-07-06 14:29:38 +00:00
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
if ( IRCV3 )
add_definitions(-DUIRC_IRCV3)
endif()
2020-07-09 20:54:11 +00:00
if ( BUILD_TESTS )
enable_testing()
add_subdirectory(tests)
endif()
2020-07-22 16:57:59 +00:00
set(build_FILES
src/assemblers.c
src/misc.c
src/tokenizers.c
src/validators.c
)
if ( BUILD_HELPERS )
message("Helper functions are going to be built.")
2020-07-22 16:57:59 +00:00
set(build_FILES ${build_FILES} src/helpers.c)
endif()
add_library(uirc SHARED ${build_FILES})
2020-07-05 11:14:41 +00:00
set_property(TARGET uirc PROPERTY C_STANDARD 99)
install(TARGETS uirc DESTINATION ${CMAKE_INSTALL_BINDIR})