CMakeLists.txt 1.69 KB
Newer Older
1 2 3 4 5 6
cmake_minimum_required(VERSION 3.12)

project(algorithms_library_toolkit
	VERSION 0.0.0
	LANGUAGES CXX)

7
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
8 9 10 11 12 13
set(CMAKE_COLOR_MAKEFILE ON)

if (NOT UNIX)
    message(FATAL_ERROR "Unavailable if not Unix")
endif ()

14 15 16 17 18
# If not specified whether Debug or Release, select Release with debug info
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
	message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
	set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
	set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
19 20
endif()

Tomáš Pecka's avatar
Tomáš Pecka committed
21 22 23 24
option(WITH_DOCS "Build Doxygen")
option(WITH_AGUI "Build agui2 interface (deprecated gui)")
option(BUILD_TESTING "Compile and run tests" ON)

25 26 27
include(alt)
include(CompilerFlags)
include(Install)
Tomáš Pecka's avatar
Tomáš Pecka committed
28
include(Version)
29

30 31
include_directories(${PROJECT_BINARY_DIR})

32 33 34 35
# testing
include(CTest)
if(BUILD_TESTING)
	include(Catch)
36
	add_subdirectory(lib/catch2)
37
	include_directories(${PROJECT_SOURCE_DIR}/tests)
38 39

	add_subdirectory(tests)
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
endif()

alt_module(alib2std)
alt_module(alib2measure)
alt_module(alib2abstraction)
alt_module(alib2common)
alt_module(alib2xml)

alt_module(alib2str)
alt_module(alib2data)
alt_module(alib2algo)
alt_module(alib2elgo)
alt_module(alib2algo_experimental)
alt_module(alib2data_experimental)
alt_module(alib2graph_data)
alt_module(alib2graph_algo)

alt_module(alib2raw)

alt_module(alib2aux)
alt_module(alib2dummy)

alt_module(alib2cli)
alt_module(alib2str_cli_integration)
alt_module(alib2raw_cli_integration)
alt_module(aql2)

67 68 69 70
if(WITH_AGUI)
	alt_module(alib2gui)
	alt_module(agui2)
endif()
Tomáš Pecka's avatar
Tomáš Pecka committed
71 72

# docs
Tomáš Pecka's avatar
Tomáš Pecka committed
73
if(WITH_DOCS)
Tomáš Pecka's avatar
Tomáš Pecka committed
74 75 76
	alt_doxygen()
endif()