2017-11-15 01:23:51 +01:00
|
|
|
cmake_minimum_required(VERSION 3.5.0)
|
|
|
|
|
|
|
|
|
|
project(prjxray)
|
2017-11-17 10:20:12 +01:00
|
|
|
option(PRJXRAY_BUILD_TESTING "" ON)
|
2017-11-15 01:23:51 +01:00
|
|
|
|
2017-12-01 17:59:42 +01:00
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
|
add_compile_options(-Wall -Werror)
|
2017-11-15 01:23:51 +01:00
|
|
|
|
2017-11-15 02:45:11 +01:00
|
|
|
# Hack for missing option in cctz
|
|
|
|
|
option(BUILD_TESTING "" OFF)
|
|
|
|
|
|
2017-11-17 10:20:12 +01:00
|
|
|
|
|
|
|
|
if(PRJXRAY_BUILD_TESTING)
|
|
|
|
|
enable_testing()
|
2017-11-18 07:53:58 +01:00
|
|
|
add_compile_options(-O0 -g)
|
|
|
|
|
else()
|
|
|
|
|
add_compile_options(-O3)
|
2017-11-17 10:20:12 +01:00
|
|
|
endif()
|
|
|
|
|
|
2017-11-16 00:13:59 +01:00
|
|
|
add_subdirectory(third_party/googletest EXCLUDE_FROM_ALL)
|
|
|
|
|
add_subdirectory(third_party/gflags EXCLUDE_FROM_ALL)
|
|
|
|
|
add_subdirectory(third_party/cctz EXCLUDE_FROM_ALL)
|
|
|
|
|
add_subdirectory(third_party/abseil-cpp EXCLUDE_FROM_ALL)
|
2017-11-15 02:45:11 +01:00
|
|
|
|
2017-11-17 10:20:12 +01:00
|
|
|
add_subdirectory(lib)
|
2017-11-15 01:23:51 +01:00
|
|
|
add_subdirectory(tools)
|