This repository has been archived on 2023-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
plasp/CMakeLists.txt

34 lines
1.2 KiB
CMake
Raw Normal View History

2016-05-20 15:29:24 +02:00
cmake_minimum_required(VERSION 2.6)
project(plasp CXX)
2016-11-29 02:43:17 +01:00
option(PLASP_BUILD_TESTS "Build unit tests" OFF)
2016-10-07 16:40:01 +02:00
find_package(Boost 1.55.0 COMPONENTS program_options iostreams system REQUIRED)
2016-05-20 15:29:24 +02:00
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Werror")
2016-05-20 15:29:24 +02:00
set(CMAKE_CXX_FLAGS_DEBUG "-g")
2016-11-29 02:43:17 +01:00
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
2016-05-20 15:29:24 +02:00
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
2017-05-09 13:01:10 +02:00
if (CMAKE_GENERATOR STREQUAL "Ninja" AND
((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)))
# Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support.
# Rationale in https://github.com/ninja-build/ninja/issues/814
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
endif()
2017-05-12 14:17:57 +02:00
add_subdirectory(lib/tokenize)
add_subdirectory(lib/pddlparse)
2016-05-20 15:29:24 +02:00
add_subdirectory(src)
2016-11-29 02:43:17 +01:00
add_subdirectory(app)
if(PLASP_BUILD_TESTS)
2016-05-20 18:46:37 +02:00
add_subdirectory(tests)
2016-11-29 02:43:17 +01:00
endif(PLASP_BUILD_TESTS)