libcryfs/CMakeLists.txt

37 lines
1.1 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
cmake_policy(SET CMP0054 NEW)
# note: for clang-tidy, we need cmake 3.6, or (if the return code should be handled correctly, e.g. on CI), we need 3.8.
2018-05-19 23:42:00 +02:00
# TODO Perf test:
# - try if setting CRYPTOPP_NATIVE_ARCH=ON and adding -march=native to the compile commands for cryfs source files makes a difference
# -> if yes, offer a cmake option to enable both of these
project(cryfs)
include(utils.cmake)
2015-02-17 01:02:15 +01:00
2016-02-11 12:53:42 +01:00
require_gcc_version(4.8)
require_clang_version(3.7)
2015-03-16 02:15:51 +01:00
# Default value is not to build test cases
if(NOT BUILD_TESTING)
set(BUILD_TESTING OFF CACHE BOOL "BUILD_TESTING")
endif(NOT BUILD_TESTING)
2018-04-16 06:37:06 +02:00
# Default value is to build in release mode
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE INTERNAL "CMAKE_BUILD_TYPE")
endif(NOT CMAKE_BUILD_TYPE)
# Default value is to do update checks
if(NOT CRYFS_UPDATE_CHECKS)
set(CRYFS_UPDATE_CHECKS ON CACHE BOOL "CRYFS_UPDATE_CHECKS")
endif(NOT CRYFS_UPDATE_CHECKS)
add_subdirectory(vendor)
add_subdirectory(src)
2017-03-26 15:08:47 +02:00
add_subdirectory(doc)
add_subdirectory(test)
add_subdirectory(cpack)