Write simple CMake build config
This commit is contained in:
21
CMakeLists.txt
Normal file
21
CMakeLists.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(batomorph LANGUAGES C)
|
||||
|
||||
macro(configure_target target)
|
||||
set_property(TARGET ${target} PROPERTY C_STANDARD 23)
|
||||
set_property(TARGET ${target} PROPERTY C_EXTENSIONS OFF)
|
||||
target_compile_options(${target} PRIVATE -Wall -Wextra -pedantic)
|
||||
endmacro()
|
||||
|
||||
add_library(batomorph
|
||||
src/ff.c
|
||||
)
|
||||
configure_target(batomorph)
|
||||
target_include_directories(batomorph PUBLIC include)
|
||||
|
||||
add_executable(demo
|
||||
demo.c
|
||||
)
|
||||
configure_target(demo)
|
||||
target_link_libraries(demo PRIVATE batomorph m)
|
||||
Reference in New Issue
Block a user