2024-02-04 18:23:31 +00:00
|
|
|
# Works with 3.14 and tested through 3.28
|
|
|
|
cmake_minimum_required(VERSION 3.14...3.28)
|
|
|
|
|
2024-02-14 09:53:46 +00:00
|
|
|
|
2024-02-04 18:23:31 +00:00
|
|
|
project(Rdricpp
|
|
|
|
VERSION 0.2
|
|
|
|
DESCRIPTION "Rikaitan Deinflector Reference Implementation in C++."
|
|
|
|
LANGUAGES CXX)
|
|
|
|
|
|
|
|
# Only do these if this is the main project
|
|
|
|
# Testing only available if this is the main program
|
|
|
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
|
|
|
|
|
|
|
|
include(CTest)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# The compiled library code is here
|
|
|
|
add_subdirectory(src)
|
|
|
|
|
|
|
|
# The executable code is here
|
|
|
|
add_subdirectory(bin)
|
|
|
|
|
2024-02-14 09:25:34 +00:00
|
|
|
|
|
|
|
|
2024-02-04 18:23:31 +00:00
|
|
|
# Run tests with make test
|
|
|
|
if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR RDRICPP_TESTING)
|
|
|
|
AND BUILD_TESTING)
|
|
|
|
add_subdirectory(tests)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|