-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
26 lines (20 loc) · 1.18 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cmake_minimum_required(VERSION 3.5)
# detect if Catch is being bundled,
# disable testsuite in that case
if(NOT DEFINED PROJECT_NAME)
set(NOT_SUBPROJECT ON)
else()
set(NOT_SUBPROJECT OFF)
endif()
project(batchsystem LANGUAGES CXX VERSION 1.0.0)
FIND_PACKAGE(PkgConfig REQUIRED) # workaround else PKG_SEARCH_MODULE isn't found
PKG_SEARCH_MODULE(LIBXMLPP REQUIRED libxml++-2.6 libxml++-3.0)
message(STATUS "libxml++: ${LIBXMLPP_LIBRARIES}")
if(NOT_SUBPROJECT)
# use custom flags if compiled as main project only, else use parent projects
set( CMAKE_CXX_FLAGS "-Werror -Wall -Wextra -pedantic -Wshadow -Wswitch-enum -Wpointer-arith -Wwrite-strings -Wunreachable-code -Wformat=2 -Wundef -Wredundant-decls -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wnoexcept -Wredundant-decls -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=1 -Wundef -Wno-deprecated-copy -Wfloat-equal -Wswitch-default -Wsign-conversion -Wconversion -Wold-style-cast -Wstrict-overflow=2")
endif(NOT_SUBPROJECT)
add_subdirectory(src/)
if(NOT_SUBPROJECT)
add_subdirectory(test/)
endif(NOT_SUBPROJECT)