|
| 1 | +# CMakeLists.txt |
| 2 | + |
| 3 | +# CMake setup |
| 4 | +cmake_minimum_required (VERSION 3.8) |
| 5 | + |
| 6 | +# Set a default build type if none was specified |
| 7 | +set(default_build_type"RelWithDebInfo") |
| 8 | + |
| 9 | +if(NOTCMAKE_BUILD_TYPEANDNOTCMAKE_CONFIGURATION_TYPES) |
| 10 | + message(STATUS"Setting build type to '${default_build_type}' as none was specified.") |
| 11 | + set(CMAKE_BUILD_TYPE"${default_build_type}"CACHE |
| 12 | + STRING"Choose the type of build." FORCE) |
| 13 | +# Set the possible values of build type for cmake-gui |
| 14 | + set_property(CACHECMAKE_BUILD_TYPE PROPERTYSTRINGS |
| 15 | +"Debug""Release""MinSizeRel""RelWithDebInfo") |
| 16 | +endif() |
| 17 | + |
| 18 | +# Project initialisation |
| 19 | +project("datalog-cpp") |
| 20 | + |
| 21 | +# specify the C++ standard |
| 22 | +set(CMAKE_CXX_STANDARD 17) |
| 23 | + |
| 24 | +# types_test target |
| 25 | +add_executable(types_test ../tests/types_test.cpp) |
| 26 | +target_include_directories(types_testPUBLIC${CMAKE_CURRENT_SOURCE_DIR}) |
| 27 | +target_compile_definitions(types_testPUBLICUNIX) |