diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-11-13 16:48:03 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-11-13 16:48:03 -0500 |
commit | 244fa85e98fa6f325025f49aca6e1fbb1e440582 (patch) | |
tree | 502ab3bbfb49749fad1cfaa5f2e20268d3f5c5e4 /CMakeLists.txt | |
parent | e801b594a18dbaf9283ad860c86e4a07b2b1e866 (diff) | |
download | reloc-244fa85e98fa6f325025f49aca6e1fbb1e440582.tar.gz |
Decouple main program and add initial tests
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 583d65c..c718375 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,22 @@ cmake_minimum_required(VERSION 2.8.11) -project(reloc C) +project(relocate C) set(VERSION "1.0.0") - set(CMAKE_C_STANDARD 99) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra") +enable_testing() +add_subdirectory(test) + configure_file(version.h.in version.h) + include_directories("${CMAKE_BINARY_DIR}") -add_executable(reloc main.c reloc.h) + +add_library(relocate + STATIC reloc.c) + +add_executable(reloc main.c) + +target_link_libraries(reloc relocate) + install(TARGETS reloc RUNTIME DESTINATION bin) |