2016-06-13 11:51:11 +00:00
|
|
|
# Please ensure your changes or patch meets minimum requirements.
|
2016-09-14 19:15:42 +00:00
|
|
|
# The minimum requirements are 2.8.5. They roughly equate to Ubuntu 12.04 LTS
|
|
|
|
# Please do not check in something for 2.8.12 or 3.5.0. To test your changes,
|
|
|
|
# please set up a Ubuntu 12.04 LTS system. Then, manually install Cmake 2.8.5
|
|
|
|
# from http://cmake.org/Wiki/CMake_Released_Versions.
|
2016-06-13 11:51:11 +00:00
|
|
|
|
2015-12-26 23:24:43 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
|
|
|
|
|
|
|
|
project(cryptopp)
|
|
|
|
|
2016-09-27 19:44:04 +00:00
|
|
|
# Make RelWithDebInfo the default (it does e.g. add '-O2 -g -DNDEBUG' for GNU)
|
2017-08-24 11:26:14 +00:00
|
|
|
# If not in multi-configuration environments, no explicit build type or CXX
|
2016-09-27 19:44:04 +00:00
|
|
|
# flags are set by the user and if we are the root CMakeLists.txt file.
|
2017-08-24 11:26:14 +00:00
|
|
|
if (NOT CMAKE_CONFIGURATION_TYPES AND
|
2016-09-27 19:44:04 +00:00
|
|
|
NOT CMAKE_NO_BUILD_TYPE AND
|
|
|
|
NOT CMAKE_BUILD_TYPE AND
|
|
|
|
NOT CMAKE_CXX_FLAGS AND
|
|
|
|
CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|
|
|
set(CMAKE_BUILD_TYPE RelWithDebInfo)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-09-27 19:44:04 +00:00
|
|
|
|
2017-03-13 19:57:47 +00:00
|
|
|
set(cryptopp_VERSION_MAJOR 6)
|
|
|
|
set(cryptopp_VERSION_MINOR 0)
|
2016-12-01 23:10:56 +00:00
|
|
|
set(cryptopp_VERSION_PATCH 0)
|
2015-12-26 11:45:59 +00:00
|
|
|
|
|
|
|
include(GNUInstallDirs)
|
2016-09-26 19:21:27 +00:00
|
|
|
include(CheckCXXCompilerFlag)
|
2015-12-26 11:45:59 +00:00
|
|
|
|
|
|
|
#============================================================================
|
|
|
|
# Settable options
|
|
|
|
#============================================================================
|
|
|
|
|
2016-06-01 21:21:40 +00:00
|
|
|
option(BUILD_STATIC "Build static library" ON)
|
|
|
|
option(BUILD_SHARED "Build shared library" ON)
|
2015-12-26 11:45:59 +00:00
|
|
|
option(BUILD_TESTING "Build library tests" ON)
|
|
|
|
option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF)
|
2017-01-05 08:19:19 +00:00
|
|
|
option(USE_INTERMEDIATE_OBJECTS_TARGET "Use a common intermediate objects target for the static and shared library targets" ON)
|
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CMAKE_VERSION VERSION_LESS 2.8.8 AND USE_INTERMEDIATE_OBJECTS_TARGET)
|
2017-01-05 08:19:19 +00:00
|
|
|
message(STATUS "Forcing USE_INTERMEDIATE_OBJECTS_TARGET to OFF - requires CMake >= 2.8.8")
|
|
|
|
set(USE_INTERMEDIATE_OBJECTS_TARGET OFF CACHE BOOL "Use a common intermediate objects target for the static and shared library targets" FORCE)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
|
|
|
option(DISABLE_ASM "Disable ASM" OFF)
|
|
|
|
option(DISABLE_SSSE3 "Disable SSSE3" OFF)
|
2017-04-23 10:37:03 +00:00
|
|
|
option(DISABLE_SSE4 "Disable SSE4" OFF)
|
2015-12-26 11:45:59 +00:00
|
|
|
option(DISABLE_AESNI "Disable AES-NI" OFF)
|
2017-04-22 23:46:13 +00:00
|
|
|
option(DISABLE_SHA "Disable SHA" OFF)
|
2017-08-24 11:26:14 +00:00
|
|
|
option(CRYPTOPP_NATIVE_ARCH "Enable native architecture" OFF)
|
2015-12-26 23:23:33 +00:00
|
|
|
set(CRYPTOPP_DATA_DIR "" CACHE PATH "Crypto++ test data directory")
|
2015-12-26 11:45:59 +00:00
|
|
|
|
|
|
|
#============================================================================
|
|
|
|
# Internal compiler options
|
|
|
|
#============================================================================
|
|
|
|
|
2016-09-14 03:54:16 +00:00
|
|
|
# Stop hiding the damn output...
|
2016-09-15 16:04:49 +00:00
|
|
|
# set(CMAKE_VERBOSE_MAKEFILE on)
|
2016-09-14 03:54:16 +00:00
|
|
|
|
2016-09-15 06:20:15 +00:00
|
|
|
# Always 1 ahead in Master. Also see http://groups.google.com/forum/#!topic/cryptopp-users/SFhqLDTQPG4
|
|
|
|
set(LIB_VER ${cryptopp_VERSION_MAJOR}${cryptopp_VERSION_MINOR}${cryptopp_VERSION_PATCH})
|
|
|
|
|
2016-06-17 12:23:14 +00:00
|
|
|
# Don't use RPATH's. The resulting binary could fail a security audit.
|
2016-06-17 12:35:08 +00:00
|
|
|
if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
|
|
|
|
set(CMAKE_MACOSX_RPATH 0)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-06-17 12:23:14 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
2015-12-26 11:45:59 +00:00
|
|
|
add_definitions(-wd68 -wd186 -wd279 -wd327 -wd161 -wd3180)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
2017-05-20 00:12:29 +00:00
|
|
|
# Also see http://github.com/weidai11/cryptopp/issues/395
|
2017-08-27 00:53:35 +00:00
|
|
|
if (DISABLE_ASM)
|
2015-12-26 11:45:59 +00:00
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_ASM)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
if (DISABLE_SSSE3)
|
2015-12-26 11:45:59 +00:00
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_SSSE3)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
if (DISABLE_SSE4)
|
2017-08-23 20:13:20 +00:00
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_SSE4)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
if (DISABLE_AESNI)
|
2015-12-26 11:45:59 +00:00
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_AESNI)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
if (DISABLE_SHA)
|
2017-04-22 23:46:13 +00:00
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_SHA)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
if (NOT CRYPTOPP_DATA_DIR STREQUAL "")
|
2016-04-07 10:50:09 +00:00
|
|
|
add_definitions(-DCRYPTOPP_DATA_DIR="${CRYPTOPP_DATA_DIR}")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
2017-08-24 11:26:14 +00:00
|
|
|
# CRYPTOPP_NATIVE_ARCH is set below once we know what it means to be "native"
|
|
|
|
|
2017-08-23 20:13:20 +00:00
|
|
|
###############################################################################
|
|
|
|
|
2017-08-29 11:33:25 +00:00
|
|
|
# Try to find a Posix compatible grep and sed. Solaris, Digital Unix,
|
|
|
|
# Tru64, HP-UX and a few others need tweaking
|
|
|
|
|
|
|
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
|
|
|
|
set(GREP_CMD /usr/xpg4/bin/grep)
|
|
|
|
set(SED_CMD /usr/xpg4/bin/sed)
|
|
|
|
else()
|
|
|
|
set(GREP_CMD grep)
|
|
|
|
set(SED_CMD sed)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
function(CheckCompilerOption option variable)
|
|
|
|
|
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
|
|
|
|
|
|
|
message(STATUS "Performing Test ${variable}")
|
|
|
|
execute_process(
|
|
|
|
COMMAND sh -c "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} ${option} -E -xdumpmacros /dev/null 2>&1"
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c -E "illegal value ignored"
|
2017-08-27 00:53:35 +00:00
|
|
|
RESULT_VARIABLE COMMAND_RESULT
|
|
|
|
OUTPUT_VARIABLE COMMAND_OUTPUT
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
|
|
|
# No dereference below. Thanks for the warning, CMake (not!).
|
2017-08-28 22:15:32 +00:00
|
|
|
if (COMMAND_RESULT AND NOT COMMAND_OUTPUT)
|
2017-08-27 00:53:35 +00:00
|
|
|
set(${variable} 1 PARENT_SCOPE)
|
|
|
|
message(STATUS "Performing Test ${variable} - Success")
|
|
|
|
else ()
|
|
|
|
set(${variable} 0 PARENT_SCOPE)
|
|
|
|
message(STATUS "Performing Test ${variable} - Failed")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
else ()
|
|
|
|
|
|
|
|
CHECK_CXX_COMPILER_FLAG(${option} ${variable})
|
|
|
|
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
endfunction(CheckCompilerOption)
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
2017-08-26 09:07:21 +00:00
|
|
|
function(DumpMachine output pattern)
|
2017-08-29 11:33:25 +00:00
|
|
|
execute_process(
|
|
|
|
COMMAND sh -c "${CMAKE_CXX_COMPILER} -dumpmachine 2>&1"
|
|
|
|
COMMAND ${GREP_CMD} -i -c -E "${pattern}"
|
|
|
|
OUTPUT_VARIABLE ${output}
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
set(${output} "${${output}}" PARENT_SCOPE)
|
2017-08-26 09:07:21 +00:00
|
|
|
endfunction(DumpMachine)
|
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
# Thansk to Anonimal for MinGW; see http://github.com/weidai11/cryptopp/issues/466
|
2017-08-26 09:16:22 +00:00
|
|
|
DumpMachine(CRYPTOPP_AMD64 "amd64|x86_64")
|
2017-08-26 09:07:21 +00:00
|
|
|
DumpMachine(CRYPTOPP_I386 "i.86")
|
2017-08-27 00:53:35 +00:00
|
|
|
DumpMachine(CRYPTOPP_MINGW32 "\\<mingw32\\>")
|
|
|
|
DumpMachine(CRYPTOPP_MINGW64 "w64-mingw32|mingw64")
|
2017-08-26 09:07:21 +00:00
|
|
|
DumpMachine(CRYPTOPP_X32 "x32")
|
|
|
|
DumpMachine(CRYPTOPP_AARCH32 "Aarch32")
|
|
|
|
DumpMachine(CRYPTOPP_AARCH64 "Aarch64")
|
2017-08-27 00:53:35 +00:00
|
|
|
DumpMachine(CRYPTOPP_ARMHF "armhf|arm7l|eabihf")
|
|
|
|
DumpMachine(CRYPTOPP_ARM "\\<arm\\>")
|
2017-08-23 20:13:20 +00:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
2017-08-26 13:55:06 +00:00
|
|
|
# Test SunCC for a string like 'CC: Sun C++ 5.13 SunOS_i386'
|
2017-08-27 00:53:35 +00:00
|
|
|
if (NOT CRYPTOPP_SOLARIS)
|
2017-08-26 13:55:06 +00:00
|
|
|
execute_process(COMMAND sh -c "${CMAKE_CXX_COMPILER} -V 2>&1"
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c "SunOS"
|
2017-08-26 13:55:06 +00:00
|
|
|
OUTPUT_VARIABLE CRYPTOPP_SOLARIS
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-26 13:55:06 +00:00
|
|
|
|
|
|
|
# Test GCC for a string like 'i386-pc-solaris2.11'
|
2017-08-27 00:53:35 +00:00
|
|
|
if (NOT CRYPTOPP_SOLARIS)
|
2017-08-26 13:55:06 +00:00
|
|
|
execute_process(COMMAND sh -c "${CMAKE_CXX_COMPILER} -dumpmachine 2>&1"
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c "Solaris"
|
2017-08-26 13:55:06 +00:00
|
|
|
OUTPUT_VARIABLE CRYPTOPP_SOLARIS
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-26 13:55:06 +00:00
|
|
|
|
|
|
|
# DumpMachine SunCC style
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
2017-08-26 13:55:06 +00:00
|
|
|
|
|
|
|
# SunCC is 32-bit, but it builds both 32 and 64 bit. Use
|
|
|
|
execute_process(COMMAND sh -c "${CMAKE_CXX_COMPILER} -V 2>&1"
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c "Sparc"
|
2017-08-26 13:55:06 +00:00
|
|
|
OUTPUT_VARIABLE CRYPTOPP_SPARC
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
|
|
|
execute_process(COMMAND sh -c "${CMAKE_CXX_COMPILER} -V 2>&1"
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c -E "i386|i86"
|
2017-08-26 13:55:06 +00:00
|
|
|
OUTPUT_VARIABLE CRYPTOPP_I386
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
|
|
|
execute_process(COMMAND isainfo -k
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c "i386"
|
2017-08-26 13:55:06 +00:00
|
|
|
OUTPUT_VARIABLE KERNEL_I386
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
|
|
|
execute_process(COMMAND isainfo -k
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c "amd64"
|
2017-08-26 13:55:06 +00:00
|
|
|
OUTPUT_VARIABLE KERNEL_AMD64
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
|
|
|
execute_process(COMMAND isainfo -k
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c "Sparc"
|
2017-08-26 13:55:06 +00:00
|
|
|
OUTPUT_VARIABLE KERNEL_SPARC
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
|
|
|
execute_process(COMMAND isainfo -k
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c -E "UltraSarc|Sparc64|SparcV9"
|
2017-08-26 13:55:06 +00:00
|
|
|
OUTPUT_VARIABLE KERNEL_SPARC64
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
# Build for 32-bit on 64-bit kernels unless Native Arch is
|
|
|
|
# specified. Note that this is a policy provided by Sun.
|
|
|
|
if (CRYPTOPP_NATIVE_ARCH AND KERNEL_I386)
|
2017-08-26 13:55:06 +00:00
|
|
|
unset(CRYPTOPP_AMD64)
|
|
|
|
set(CRYPTOPP_I386 1)
|
2017-08-27 00:53:35 +00:00
|
|
|
elseif (CRYPTOPP_NATIVE_ARCH AND KERNEL_AMD64)
|
2017-08-26 13:55:06 +00:00
|
|
|
unset(CRYPTOPP_I386)
|
|
|
|
set(CRYPTOPP_AMD64 1)
|
2017-08-27 00:53:35 +00:00
|
|
|
elseif (CRYPTOPP_NATIVE_ARCH AND KERNEL_SPARC)
|
2017-08-26 13:55:06 +00:00
|
|
|
unset(KERNEL_SPARC64)
|
|
|
|
set(KERNEL_SPARC 1)
|
2017-08-27 00:53:35 +00:00
|
|
|
elseif (CRYPTOPP_NATIVE_ARCH AND KERNEL_SPARC64)
|
2017-08-26 13:55:06 +00:00
|
|
|
unset(KERNEL_SPARC)
|
|
|
|
set(KERNEL_SPARC64 1)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
2017-08-26 13:55:06 +00:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
2017-08-26 13:55:06 +00:00
|
|
|
|
|
|
|
execute_process(COMMAND sh -c "${CMAKE_CXX_COMPILER} --version 2>&1"
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c "macports"
|
2017-04-18 06:57:38 +00:00
|
|
|
OUTPUT_VARIABLE MACPORTS
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
|
|
|
if (MACPORTS EQUAL 0)
|
|
|
|
# Get GAS version, add defs + set as appropriate
|
2017-08-26 13:55:06 +00:00
|
|
|
set(GAS_CMD sh -c "${CMAKE_CXX_COMPILER} -xc -c /dev/null -Wa,-v -o/dev/null 2>&1")
|
2017-04-18 06:57:38 +00:00
|
|
|
|
|
|
|
execute_process(COMMAND ${GAS_CMD}
|
|
|
|
OUTPUT_VARIABLE GAS_STRING
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
string(FIND ${GAS_STRING} "GNU assumbler" GAS_OUTPUT)
|
|
|
|
|
|
|
|
if (GAS_OUTPUT)
|
|
|
|
#.intel_syntax wasn't supported until GNU assembler 2.10
|
|
|
|
|
|
|
|
# TODO(unassigned): string() REGEX was not cooperating at time of writing. Re-implement as needed.
|
|
|
|
execute_process(COMMAND echo ${GAS_STRING}
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c -E "GNU assembler version (2\\.[1-9][0-9]|[3-9])"
|
2017-04-18 06:57:38 +00:00
|
|
|
OUTPUT_VARIABLE GAS210_OR_LATER)
|
|
|
|
if (GAS210_OR_LATER EQUAL 0)
|
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_ASM)
|
2017-08-26 13:55:06 +00:00
|
|
|
set(DISABLE_ASM 1)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-04-18 06:57:38 +00:00
|
|
|
|
|
|
|
execute_process(COMMAND echo ${GAS_STRING}
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c -E "GNU assembler version (2\\.1[7-9]|2\\.[2-9]|[3-9])"
|
2017-04-18 06:57:38 +00:00
|
|
|
OUTPUT_VARIABLE GAS217_OR_LATER)
|
|
|
|
if (GAS217_OR_LATER EQUAL 0)
|
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_SSSE3)
|
2017-08-24 11:26:14 +00:00
|
|
|
set(DISABLE_SSSE3 1)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-04-18 06:57:38 +00:00
|
|
|
|
2017-04-23 11:38:25 +00:00
|
|
|
# OpenBSD and CentOS 5 needed this one due to ARIA and BLAKE2
|
2017-04-23 10:37:03 +00:00
|
|
|
execute_process(COMMAND echo ${GAS_STRING}
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c -E "GNU assembler version (2\\.1[8-9]|2\\.[2-9]|[3-9])"
|
2017-04-23 10:37:03 +00:00
|
|
|
OUTPUT_VARIABLE GAS218_OR_LATER)
|
|
|
|
if (GAS218_OR_LATER EQUAL 0)
|
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_SSE4)
|
2017-08-24 11:26:14 +00:00
|
|
|
set(DISABLE_SSE4 1)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-04-23 10:37:03 +00:00
|
|
|
|
2017-04-18 06:57:38 +00:00
|
|
|
execute_process(COMMAND echo ${GAS_STRING}
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c -E "GNU assembler version (2\\.19|2\\.[2-9]|[3-9])"
|
2017-04-18 06:57:38 +00:00
|
|
|
OUTPUT_VARIABLE GAS219_OR_LATER)
|
|
|
|
if (GAS219_OR_LATER EQUAL 0)
|
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_AESNI)
|
2017-08-24 11:26:14 +00:00
|
|
|
set(DISABLE_AESNI 1)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-04-22 23:46:13 +00:00
|
|
|
|
2017-04-23 10:37:03 +00:00
|
|
|
# Ubuntu 10 and Ubuntu 12 needed this one
|
2017-04-22 23:46:13 +00:00
|
|
|
execute_process(COMMAND echo ${GAS_STRING}
|
2017-08-29 11:33:25 +00:00
|
|
|
COMMAND ${GREP_CMD} -i -c -E "GNU assembler version (2\\.2[3-9]|2\\.[3-9]|[3-9])"
|
2017-04-22 23:46:13 +00:00
|
|
|
OUTPUT_VARIABLE GAS223_OR_LATER)
|
|
|
|
if (GAS223_OR_LATER EQUAL 0)
|
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_SHA)
|
2017-08-24 11:26:14 +00:00
|
|
|
set(DISABLE_SHA 1)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
endif ()
|
2017-04-18 06:57:38 +00:00
|
|
|
|
2017-08-26 13:55:06 +00:00
|
|
|
# TODO: what about ICC and LLVM on Windows?
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
|
|
if (CMAKE_SYSTEM_VERSION MATCHES "10\\.0.*")
|
2017-08-26 13:55:06 +00:00
|
|
|
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D\"_WIN32_WINNT=0x0A00\"" )
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-26 13:55:06 +00:00
|
|
|
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI\"winapifamily.h\"" )
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-09-13 16:51:17 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
# Enable PIC for all target machines except 32-bit i386 due to register pressures.
|
2017-08-26 13:55:06 +00:00
|
|
|
if (NOT CRYPTOPP_I386)
|
|
|
|
SET(CMAKE_POSITION_INDEPENDENT_CODE 1)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-09-14 10:33:34 +00:00
|
|
|
|
2017-08-24 11:26:14 +00:00
|
|
|
# Solaris specific
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_SOLARIS)
|
2016-10-21 20:49:04 +00:00
|
|
|
|
2017-08-26 13:55:06 +00:00
|
|
|
# Determine 32-bit vs 64-bit
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_AMD64 OR CRYPTOPP_SPARC64)
|
2017-08-26 13:55:06 +00:00
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
2017-08-27 00:53:35 +00:00
|
|
|
else ()
|
2017-08-26 13:55:06 +00:00
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-23 20:13:20 +00:00
|
|
|
|
2017-08-26 13:55:06 +00:00
|
|
|
# SunCC needs -template=no%extdef
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -template=no%extdef")
|
|
|
|
endif ()
|
2016-09-14 19:15:42 +00:00
|
|
|
|
|
|
|
# GCC needs to enable use of '/'
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,--divide")
|
|
|
|
endif ()
|
2016-09-14 19:15:42 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-09-14 17:57:53 +00:00
|
|
|
|
2016-09-15 06:20:15 +00:00
|
|
|
# Link is driven through the compiler, but CXXFLAGS are not used. Also see
|
|
|
|
# http://public.kitware.com/pipermail/cmake/2003-June/003967.html
|
|
|
|
if (NOT (WINDOWS OR WINDOWS_STORE OR WINDOWS_PHONE))
|
|
|
|
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_FLAGS}")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-09-15 06:20:15 +00:00
|
|
|
|
2015-12-26 11:45:59 +00:00
|
|
|
#============================================================================
|
|
|
|
# Sources & headers
|
|
|
|
#============================================================================
|
|
|
|
|
|
|
|
# Library headers
|
|
|
|
file(GLOB cryptopp_HEADERS *.h)
|
2017-08-27 00:53:35 +00:00
|
|
|
# Remove headers used to build test suite
|
|
|
|
list(REMOVE_ITEM cryptopp_HEADERS
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/bench.h
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/validate.h
|
|
|
|
)
|
2015-12-26 11:45:59 +00:00
|
|
|
|
2016-06-17 12:23:14 +00:00
|
|
|
# Test sources. You can use the GNUmakefile to generate the list: `make sources`.
|
2017-04-14 01:45:21 +00:00
|
|
|
file(GLOB cryptopp_SOURCES_TEST test.cpp bench1.cpp bench2.cpp validat0.cpp validat1.cpp validat2.cpp validat3.cpp adhoc.cpp datatest.cpp regtest1.cpp regtest2.cpp regtest3.cpp fipsalgt.cpp dlltest.cpp fipstest.cpp)
|
2015-12-26 11:45:59 +00:00
|
|
|
|
2016-06-17 12:23:14 +00:00
|
|
|
# Library sources. You can use the GNUmakefile to generate the list: `make sources`.
|
2017-05-20 00:12:29 +00:00
|
|
|
# Makefile sorted them at http://github.com/weidai11/cryptopp/pull/426.
|
2015-12-26 11:45:59 +00:00
|
|
|
file(GLOB cryptopp_SOURCES *.cpp)
|
2017-05-20 00:12:29 +00:00
|
|
|
list(SORT cryptopp_SOURCES)
|
2015-12-26 11:45:59 +00:00
|
|
|
list(REMOVE_ITEM cryptopp_SOURCES
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cryptlib.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cpu.cpp
|
2016-09-14 16:03:27 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/integer.cpp
|
2015-12-26 11:45:59 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/simple.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/winpipes.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cryptlib_bds.cpp
|
|
|
|
${cryptopp_SOURCES_TEST}
|
|
|
|
)
|
|
|
|
set(cryptopp_SOURCES
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cryptlib.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cpu.cpp
|
2016-09-14 16:03:27 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/integer.cpp
|
2015-12-26 11:45:59 +00:00
|
|
|
${cryptopp_SOURCES}
|
|
|
|
)
|
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (MINGW OR WIN32)
|
2015-12-26 11:45:59 +00:00
|
|
|
list(APPEND cryptopp_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/winpipes.cpp)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (MSVC AND NOT DISABLE_ASM)
|
|
|
|
if (${CMAKE_GENERATOR} MATCHES ".*ARM")
|
2016-05-07 15:51:53 +00:00
|
|
|
message(STATUS "Disabling ASM because ARM is specified as target platform.")
|
2017-08-27 00:53:35 +00:00
|
|
|
else ()
|
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
2016-05-07 15:51:53 +00:00
|
|
|
list(APPEND cryptopp_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm)
|
|
|
|
list(APPEND cryptopp_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm)
|
|
|
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm PROPERTIES COMPILE_FLAGS "/D_M_X64")
|
|
|
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm PROPERTIES COMPILE_FLAGS "/D_M_X64")
|
|
|
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/rdrand.asm PROPERTIES COMPILE_FLAGS "/D_M_X64")
|
2017-08-27 00:53:35 +00:00
|
|
|
else ()
|
2016-05-07 15:51:53 +00:00
|
|
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm PROPERTIES COMPILE_FLAGS "/D_M_X86 /safeseh")
|
|
|
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm PROPERTIES COMPILE_FLAGS "/D_M_X86 /safeseh")
|
|
|
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/rdrand.asm PROPERTIES COMPILE_FLAGS "/D_M_X86 /safeseh")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-05-07 15:51:53 +00:00
|
|
|
list(APPEND cryptopp_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/rdrand.asm)
|
|
|
|
enable_language(ASM_MASM)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
2016-04-07 10:50:09 +00:00
|
|
|
|
2017-08-23 20:13:20 +00:00
|
|
|
#============================================================================
|
|
|
|
# Architecture flags
|
|
|
|
#============================================================================
|
|
|
|
|
|
|
|
# New as of Pull Request 461, http://github.com/weidai11/cryptopp/pull/461.
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
2017-08-23 20:13:20 +00:00
|
|
|
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_AMD64 OR CRYPTOPP_I386 OR CRYPTOPP_X32)
|
2017-08-23 20:13:20 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
CheckCompilerOption("-mssse3" CRYPTOPP_IA32_SSSE3)
|
|
|
|
CheckCompilerOption("-msse4.2" CRYPTOPP_IA32_SSE4)
|
|
|
|
CheckCompilerOption("-mssse3 -mpclmul" CRYPTOPP_IA32_CLMUL)
|
|
|
|
CheckCompilerOption("-msse4.1 -maes" CRYPTOPP_IA32_AES)
|
|
|
|
CheckCompilerOption("-msse4.2 -msha" CRYPTOPP_IA32_SHA)
|
|
|
|
CheckCompilerOption("-march=native" CRYPTOPP_IA32_NATIVE)
|
2017-08-23 20:13:20 +00:00
|
|
|
|
2017-08-24 11:26:14 +00:00
|
|
|
# Deferred native arch; added to all CXXFLAGS
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CRYPTOPP_NATIVE_ARCH AND CRYPTOPP_IA32_NATIVE)
|
2017-08-24 11:26:14 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
2017-08-27 00:53:35 +00:00
|
|
|
elseif (CRYPTOPP_NATIVE_ARCH)
|
2017-08-24 11:26:14 +00:00
|
|
|
message(WARNING "CRYPTOPP_NATIVE_ARCH enabled, but failed to detect native architecture")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-24 11:26:14 +00:00
|
|
|
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_IA32_SSSE3 AND NOT DISABLE_SSSE3)
|
2017-08-24 11:26:14 +00:00
|
|
|
set_source_files_properties(aria-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_IA32_SSE4 AND NOT DISABLE_SSE4)
|
2017-08-24 11:26:14 +00:00
|
|
|
set_source_files_properties(blake2-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2")
|
|
|
|
set_source_files_properties(crc-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2")
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_IA32_CLMUL AND NOT DISABLE_AES)
|
2017-08-24 11:26:14 +00:00
|
|
|
set_source_files_properties(gcm-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3 -mpclmul")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_IA32_AES AND NOT DISABLE_AES)
|
2017-08-24 11:26:14 +00:00
|
|
|
set_source_files_properties(rijndael-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1 -maes")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_IA32_SHA AND NOT DISABLE_SHA)
|
2017-08-24 11:26:14 +00:00
|
|
|
set_source_files_properties(sha-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha")
|
|
|
|
set_source_files_properties(shacal2-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
endif ()
|
2017-08-24 11:26:14 +00:00
|
|
|
|
2017-08-28 22:15:32 +00:00
|
|
|
elseif (CRYPTOPP_AARCH32 OR CRYPTOPP_AARCH64)
|
2017-08-23 20:13:20 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
CheckCompilerOption("-march=armv8-a" CRYPTOPP_ARMV8A_BASE)
|
|
|
|
CheckCompilerOption("-march=armv8-a+crc" CRYPTOPP_ARMV8A_CRC)
|
|
|
|
CheckCompilerOption("-march=armv8-a+crypto" CRYPTOPP_ARMV8A_CRYPTO)
|
|
|
|
CheckCompilerOption("-march=armv8-a" CRYPTOPP_ARMV8A_NATIVE)
|
2017-08-24 11:26:14 +00:00
|
|
|
|
|
|
|
# Deferred native arch; added to all CXXFLAGS
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CRYPTOPP_NATIVE_ARCH AND CRYPTOPP_ARMV8A_NATIVE)
|
2017-08-24 11:26:14 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a")
|
2017-08-27 00:53:35 +00:00
|
|
|
elseif (CRYPTOPP_NATIVE_ARCH)
|
2017-08-24 11:26:14 +00:00
|
|
|
message(WARNING "CRYPTOPP_NATIVE_ARCH enabled, but failed to detect native architecture")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-23 20:13:20 +00:00
|
|
|
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_ARMV8A_BASE)
|
2017-08-23 20:13:20 +00:00
|
|
|
set_source_files_properties(aria-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a")
|
|
|
|
set_source_files_properties(blake2-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a")
|
|
|
|
set_source_files_properties(neon-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_ARMV8A_CRC)
|
2017-08-23 20:13:20 +00:00
|
|
|
set_source_files_properties(crc-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crc")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_ARMV8A_CRYPTO)
|
2017-08-23 20:13:20 +00:00
|
|
|
set_source_files_properties(gcm-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
|
|
|
set_source_files_properties(rijndael-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
|
|
|
set_source_files_properties(sha-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
|
|
|
set_source_files_properties(shacal2-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-23 20:13:20 +00:00
|
|
|
|
2017-08-28 22:15:32 +00:00
|
|
|
elseif (CRYPTOPP_ARM OR CRYPTOPP_ARMHF)
|
2017-08-23 20:13:20 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
CheckCompilerOption("-march=armv7-a -mfpu=neon" CRYPTOPP_ARMV7A_NEON)
|
|
|
|
CheckCompilerOption("-march=armv7-a -mfloat-abi=hard" CRYPTOPP_ARMV7A_HARD)
|
|
|
|
CheckCompilerOption("-march=armv7-a -mfloat-abi=softfp" CRYPTOPP_ARMV7A_SOFTFP)
|
2017-08-23 20:13:20 +00:00
|
|
|
|
2017-08-24 11:26:14 +00:00
|
|
|
# Deferred native arch; added to all CXXFLAGS
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CRYPTOPP_NATIVE_ARCH AND CRYPTOPP_ARMV7A_HARD)
|
2017-08-24 11:26:14 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mfloat-abi=hard -mfpu=neon")
|
2017-08-27 00:53:35 +00:00
|
|
|
elseif (CRYPTOPP_NATIVE_ARCH AND CRYPTOPP_ARMV7A_SOFTFP)
|
2017-08-24 11:26:14 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
|
2017-08-27 00:53:35 +00:00
|
|
|
elseif (CRYPTOPP_NATIVE_ARCH)
|
2017-08-24 11:26:14 +00:00
|
|
|
message(WARNING "CRYPTOPP_NATIVE_ARCH enabled, but failed to detect native architecture")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-24 11:26:14 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CRYPTOPP_ARMV7A_HARD AND CRYPTOPP_ARMV7A_NEON)
|
2017-08-23 20:13:20 +00:00
|
|
|
# Need to set floating point ABI to something, like "hard" of "softfp". Most Linux use hard floats ("hard").
|
|
|
|
set_source_files_properties(aria-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfloat-abi=hard -mfpu=neon")
|
|
|
|
set_source_files_properties(blake2-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfloat-abi=hard -mfpu=neon")
|
|
|
|
set_source_files_properties(gcm-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfloat-abi=hard -mfpu=neon")
|
|
|
|
set_source_files_properties(neon-simd.cpp PROPERTIES COMPILE_FLAGS "-mfloat-abi=hard -mfpu=neon")
|
2017-08-27 00:53:35 +00:00
|
|
|
elseif (CRYPTOPP_ARMV7A_SOFTFP AND CRYPTOPP_ARMV7A_NEON)
|
2017-08-23 20:13:20 +00:00
|
|
|
# Need to set floating point ABI to something, like "hard" of "softfp". Most Linux use hard floats ("hard").
|
|
|
|
set_source_files_properties(aria-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfloat-abi=softfp -mfpu=neon")
|
|
|
|
set_source_files_properties(blake2-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfloat-abi=softfp -mfpu=neon")
|
|
|
|
set_source_files_properties(gcm-simd.cpp PROPERTIES COMPILE_FLAGS "-march=armv7-a -mfloat-abi=softfp -mfpu=neon")
|
|
|
|
set_source_files_properties(neon-simd.cpp PROPERTIES COMPILE_FLAGS "-mfloat-abi=softfp -mfpu=neon")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
endif ()
|
2017-08-23 20:13:20 +00:00
|
|
|
|
2017-08-26 13:55:06 +00:00
|
|
|
# New as of Pull Request 461, http://github.com/weidai11/cryptopp/pull/461.
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
2017-08-26 13:55:06 +00:00
|
|
|
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_AMD64 OR CRYPTOPP_I386 OR CRYPTOPP_X32)
|
2017-08-26 13:55:06 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
CheckCompilerOption("-xarch=ssse3" CRYPTOPP_IA32_SSSE3)
|
|
|
|
CheckCompilerOption("-xarch=sse4_2" CRYPTOPP_IA32_SSE4)
|
|
|
|
CheckCompilerOption("-xarch=aes" CRYPTOPP_IA32_CLMUL)
|
|
|
|
CheckCompilerOption("-xarch=aes" CRYPTOPP_IA32_AES)
|
|
|
|
CheckCompilerOption("-xarch=sha" CRYPTOPP_IA32_SHA)
|
|
|
|
CheckCompilerOption("-native" CRYPTOPP_IA32_NATIVE)
|
2017-08-26 13:55:06 +00:00
|
|
|
|
|
|
|
# Deferred native arch; added to all CXXFLAGS
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CRYPTOPP_NATIVE_ARCH AND CRYPTOPP_IA32_NATIVE)
|
2017-08-26 13:55:06 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -native")
|
2017-08-27 00:53:35 +00:00
|
|
|
elseif (CRYPTOPP_NATIVE_ARCH)
|
2017-08-26 13:55:06 +00:00
|
|
|
message(WARNING "CRYPTOPP_NATIVE_ARCH enabled, but failed to detect native architecture")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-26 13:55:06 +00:00
|
|
|
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_IA32_SSSE3 AND NOT DISABLE_SSSE3)
|
2017-08-26 13:55:06 +00:00
|
|
|
set_source_files_properties(aria-simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=ssse3")
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_IA32_SSE4 AND NOT DISABLE_SSE4)
|
2017-08-26 13:55:06 +00:00
|
|
|
set_source_files_properties(blake2-simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sse4_2")
|
|
|
|
set_source_files_properties(crc-simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sse4_2")
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_IA32_CLMUL AND NOT DISABLE_AES)
|
2017-08-26 13:55:06 +00:00
|
|
|
set_source_files_properties(gcm-simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_IA32_AES AND NOT DISABLE_AES)
|
2017-08-26 13:55:06 +00:00
|
|
|
set_source_files_properties(rijndael-simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=aes")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-28 22:15:32 +00:00
|
|
|
if (CRYPTOPP_IA32_SHA AND NOT DISABLE_SHA)
|
2017-08-26 13:55:06 +00:00
|
|
|
set_source_files_properties(sha-simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sha")
|
|
|
|
set_source_files_properties(shacal2-simd.cpp PROPERTIES COMPILE_FLAGS "-xarch=sha")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
endif ()
|
2017-08-26 13:55:06 +00:00
|
|
|
|
2017-08-28 22:15:32 +00:00
|
|
|
elseif (CRYPTOPP_SPARC OR CRYPTOPP_SPARC64)
|
2017-08-26 13:55:06 +00:00
|
|
|
|
|
|
|
# Sparc's need -xmemalign=4i
|
2017-08-27 00:53:35 +00:00
|
|
|
CheckCompilerOption("-xmemalign=4i" CRYPTOPP_SUN_MEMALIGN)
|
2017-08-26 13:55:06 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CRYPTOPP_SUN_MEMALIGN STREQUAL "1")
|
2017-08-26 13:55:06 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xmemalign=4i")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-26 13:55:06 +00:00
|
|
|
|
|
|
|
# Deferred native arch; added to all CXXFLAGS
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CRYPTOPP_NATIVE_ARCH AND CRYPTOPP_SPARC_NATIVE)
|
2017-08-26 13:55:06 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -native")
|
2017-08-27 00:53:35 +00:00
|
|
|
elseif (CRYPTOPP_NATIVE_ARCH)
|
2017-08-26 13:55:06 +00:00
|
|
|
message(WARNING "CRYPTOPP_NATIVE_ARCH enabled, but failed to detect native architecture")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2017-08-26 13:55:06 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
2017-08-26 13:55:06 +00:00
|
|
|
|
2015-12-26 11:45:59 +00:00
|
|
|
#============================================================================
|
|
|
|
# Compile targets
|
|
|
|
#============================================================================
|
|
|
|
|
2016-06-21 10:47:20 +00:00
|
|
|
# Set global includes BEFORE adding any targets for legacy CMake versions
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CMAKE_VERSION VERSION_LESS 2.8.12)
|
2016-06-21 10:47:20 +00:00
|
|
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-06-21 10:47:20 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (USE_INTERMEDIATE_OBJECTS_TARGET)
|
2016-06-21 10:47:20 +00:00
|
|
|
add_library(cryptopp-object OBJECT ${cryptopp_SOURCES})
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
2016-06-01 21:21:40 +00:00
|
|
|
if (BUILD_STATIC)
|
2017-08-27 00:53:35 +00:00
|
|
|
if (USE_INTERMEDIATE_OBJECTS_TARGET)
|
2016-06-21 10:47:20 +00:00
|
|
|
add_library(cryptopp-static STATIC $<TARGET_OBJECTS:cryptopp-object>)
|
2017-08-27 00:53:35 +00:00
|
|
|
else ()
|
2016-06-21 10:47:20 +00:00
|
|
|
add_library(cryptopp-static STATIC ${cryptopp_SOURCES})
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-06-21 10:47:20 +00:00
|
|
|
|
2016-06-19 02:13:18 +00:00
|
|
|
if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
|
|
|
|
target_include_directories(cryptopp-static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/cryptopp>)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
2016-06-01 21:21:40 +00:00
|
|
|
|
|
|
|
if (BUILD_SHARED)
|
2017-08-27 00:53:35 +00:00
|
|
|
if (USE_INTERMEDIATE_OBJECTS_TARGET)
|
2016-06-21 10:47:20 +00:00
|
|
|
add_library(cryptopp-shared SHARED $<TARGET_OBJECTS:cryptopp-object>)
|
2017-08-27 00:53:35 +00:00
|
|
|
else ()
|
2016-06-21 10:47:20 +00:00
|
|
|
add_library(cryptopp-shared SHARED ${cryptopp_SOURCES})
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-06-21 10:47:20 +00:00
|
|
|
|
2016-06-19 02:13:18 +00:00
|
|
|
if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
|
|
|
|
target_include_directories(cryptopp-shared PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/cryptopp>)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
2016-06-21 10:47:20 +00:00
|
|
|
|
|
|
|
# Set filenames for targets to be "cryptopp"
|
2017-08-27 00:53:35 +00:00
|
|
|
if (NOT MSVC)
|
2015-12-26 11:45:59 +00:00
|
|
|
set(COMPAT_VERSION ${cryptopp_VERSION_MAJOR}.${cryptopp_VERSION_MINOR})
|
|
|
|
|
2016-06-01 21:21:40 +00:00
|
|
|
if (BUILD_STATIC)
|
|
|
|
set_target_properties(cryptopp-static
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME cryptopp)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-06-01 21:21:40 +00:00
|
|
|
if (BUILD_SHARED)
|
|
|
|
set_target_properties(cryptopp-shared
|
|
|
|
PROPERTIES
|
|
|
|
SOVERSION ${COMPAT_VERSION}
|
|
|
|
OUTPUT_NAME cryptopp)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
2016-06-21 10:47:20 +00:00
|
|
|
# Targets, compatible with Crypto++ GNUMakefile
|
|
|
|
if (BUILD_STATIC)
|
|
|
|
add_custom_target(static)
|
|
|
|
add_dependencies(static cryptopp-static)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-06-21 10:47:20 +00:00
|
|
|
if (BUILD_SHARED)
|
|
|
|
add_custom_target(dynamic)
|
|
|
|
add_dependencies(dynamic cryptopp-shared)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-06-21 10:47:20 +00:00
|
|
|
|
2015-12-26 11:45:59 +00:00
|
|
|
#============================================================================
|
|
|
|
# Third-party libraries
|
|
|
|
#============================================================================
|
2016-09-13 16:51:17 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (WIN32)
|
2016-06-01 21:21:40 +00:00
|
|
|
if (BUILD_STATIC)
|
|
|
|
target_link_libraries(cryptopp-static ws2_32)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-06-01 21:21:40 +00:00
|
|
|
if (BUILD_SHARED)
|
|
|
|
target_link_libraries(cryptopp-shared ws2_32)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
2016-09-13 16:51:17 +00:00
|
|
|
# This may need to be expanded to "Solaris"
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CRYPTOPP_SOLARIS)
|
2016-09-13 16:51:17 +00:00
|
|
|
if (BUILD_STATIC)
|
|
|
|
target_link_libraries(cryptopp-static nsl socket)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-09-13 16:51:17 +00:00
|
|
|
if (BUILD_SHARED)
|
|
|
|
target_link_libraries(cryptopp-shared nsl socket)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
2016-09-13 16:51:17 +00:00
|
|
|
|
2015-12-26 11:45:59 +00:00
|
|
|
find_package(Threads)
|
2016-06-01 21:21:40 +00:00
|
|
|
if (BUILD_STATIC)
|
|
|
|
target_link_libraries(cryptopp-static ${CMAKE_THREAD_LIBS_INIT})
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-06-01 21:21:40 +00:00
|
|
|
if (BUILD_SHARED)
|
|
|
|
target_link_libraries(cryptopp-shared ${CMAKE_THREAD_LIBS_INIT})
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
|
|
|
#============================================================================
|
|
|
|
# Tests
|
|
|
|
#============================================================================
|
2016-09-13 16:51:17 +00:00
|
|
|
|
2015-12-26 11:45:59 +00:00
|
|
|
enable_testing()
|
2017-08-27 00:53:35 +00:00
|
|
|
if (BUILD_TESTING)
|
2016-06-21 10:47:20 +00:00
|
|
|
add_executable(cryptest ${cryptopp_SOURCES_TEST})
|
2015-12-26 11:45:59 +00:00
|
|
|
target_link_libraries(cryptest cryptopp-static)
|
|
|
|
|
2016-06-21 13:13:47 +00:00
|
|
|
# Setting "cryptest" binary name to "cryptest.exe"
|
2017-08-27 02:34:10 +00:00
|
|
|
if (NOT (WIN32 OR CYGWIN))
|
2016-06-21 13:13:47 +00:00
|
|
|
set_target_properties(cryptest PROPERTIES OUTPUT_NAME cryptest.exe)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
if (NOT TARGET cryptest.exe)
|
2016-06-21 13:13:47 +00:00
|
|
|
add_custom_target(cryptest.exe)
|
|
|
|
add_dependencies(cryptest.exe cryptest)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-06-21 13:13:47 +00:00
|
|
|
|
2016-02-11 23:30:45 +00:00
|
|
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/TestData DESTINATION ${PROJECT_BINARY_DIR})
|
|
|
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/TestVectors DESTINATION ${PROJECT_BINARY_DIR})
|
2015-12-26 11:45:59 +00:00
|
|
|
|
2016-06-21 10:47:20 +00:00
|
|
|
add_test(NAME build_cryptest COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target cryptest)
|
2015-12-26 11:45:59 +00:00
|
|
|
add_test(NAME cryptest COMMAND $<TARGET_FILE:cryptest> v)
|
2016-06-21 10:47:20 +00:00
|
|
|
set_tests_properties(cryptest PROPERTIES DEPENDS build_cryptest)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
|
|
|
#============================================================================
|
|
|
|
# Doxygen documentation
|
|
|
|
#============================================================================
|
2016-09-13 16:51:17 +00:00
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (BUILD_DOCUMENTATION)
|
2015-12-26 11:45:59 +00:00
|
|
|
find_package(Doxygen REQUIRED)
|
|
|
|
|
2016-02-11 23:30:45 +00:00
|
|
|
set(in_source_DOCS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/html-docs")
|
2015-12-26 11:45:59 +00:00
|
|
|
set(out_source_DOCS_DIR "${PROJECT_BINARY_DIR}/html-docs")
|
|
|
|
|
|
|
|
add_custom_target(docs ALL
|
|
|
|
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile -d CRYPTOPP_DOXYGEN_PROCESSING
|
2016-02-11 23:30:45 +00:00
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
|
2015-12-26 11:45:59 +00:00
|
|
|
)
|
|
|
|
|
2017-08-27 00:53:35 +00:00
|
|
|
if (NOT ${in_source_DOCS_DIR} STREQUAL ${out_source_DOCS_DIR})
|
2015-12-26 11:45:59 +00:00
|
|
|
add_custom_command(
|
|
|
|
TARGET docs POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory "${in_source_DOCS_DIR}" "${out_source_DOCS_DIR}"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory "${in_source_DOCS_DIR}"
|
|
|
|
)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
|
|
|
#============================================================================
|
|
|
|
# Install
|
|
|
|
#============================================================================
|
2016-09-13 16:51:17 +00:00
|
|
|
|
2015-12-26 11:45:59 +00:00
|
|
|
set(export_name "cryptopp-targets")
|
|
|
|
|
|
|
|
# Runtime package
|
2016-06-01 21:21:40 +00:00
|
|
|
if (BUILD_SHARED)
|
2016-08-07 12:54:36 +00:00
|
|
|
install(
|
|
|
|
TARGETS cryptopp-shared
|
|
|
|
EXPORT ${export_name}
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
|
|
|
# Development package
|
2016-06-01 21:21:40 +00:00
|
|
|
if (BUILD_STATIC)
|
|
|
|
install(TARGETS cryptopp-static EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
install(FILES ${cryptopp_HEADERS} DESTINATION include/cryptopp)
|
|
|
|
|
|
|
|
# CMake Package
|
2017-08-27 00:53:35 +00:00
|
|
|
if (NOT CMAKE_VERSION VERSION_LESS 2.8.8) # CMakePackageConfigHelpers is supported from 2.8.8
|
2016-06-21 10:47:20 +00:00
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
write_basic_package_version_file("${PROJECT_BINARY_DIR}/cryptopp-config-version.cmake" VERSION ${cryptopp_VERSION_MAJOR}.${cryptopp_VERSION_MINOR}.${cryptopp_VERSION_PATCH} COMPATIBILITY SameMajorVersion)
|
|
|
|
install(FILES cryptopp-config.cmake ${PROJECT_BINARY_DIR}/cryptopp-config-version.cmake DESTINATION "lib/cmake/cryptopp")
|
|
|
|
install(EXPORT ${export_name} DESTINATION "lib/cmake/cryptopp")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
|
|
|
# Tests
|
2017-08-27 00:53:35 +00:00
|
|
|
if (BUILD_TESTING)
|
2015-12-26 11:45:59 +00:00
|
|
|
install(TARGETS cryptest DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2016-02-11 23:30:45 +00:00
|
|
|
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/TestData DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cryptopp)
|
|
|
|
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/TestVectors DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cryptopp)
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2015-12-26 11:45:59 +00:00
|
|
|
|
|
|
|
# Documentation
|
2017-08-27 00:53:35 +00:00
|
|
|
if (BUILD_DOCUMENTATION)
|
2015-12-26 11:45:59 +00:00
|
|
|
install(DIRECTORY "${out_source_DOCS_DIR}" DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|
2016-09-14 17:57:53 +00:00
|
|
|
|
2016-09-15 06:20:15 +00:00
|
|
|
# Print a configuration summary. We want CXX and CXXFLAGS, but they are not includd in ALL.
|
|
|
|
if (NOT CMAKE_VERSION VERSION_LESS 3.0.2)
|
2017-08-27 00:53:35 +00:00
|
|
|
if (CRYPTOPP_I386)
|
|
|
|
message(STATUS "Platform: i386/i686")
|
|
|
|
elseif (CRYPTOPP_AMD64)
|
|
|
|
message(STATUS "Platform: amd64")
|
|
|
|
elseif (CRYPTOPP_X32)
|
|
|
|
message(STATUS "Platform: x86_64-x32")
|
|
|
|
elseif (CRYPTOPP_ARMHF)
|
|
|
|
message(STATUS "Platform: armhf")
|
|
|
|
elseif (CRYPTOPP_ARM)
|
|
|
|
message(STATUS "Platform: arm")
|
|
|
|
elseif (CRYPTOPP_AARCH32)
|
|
|
|
message(STATUS "Platform: Aarch32")
|
|
|
|
elseif (CRYPTOPP_AARCH64)
|
|
|
|
message(STATUS "Platform: Aarch64")
|
|
|
|
elseif (CRYPTOPP_SPARC)
|
|
|
|
message(STATUS "Platform: Sparc")
|
|
|
|
elseif (CRYPTOPP_SPARC64)
|
|
|
|
message(STATUS "Platform: Sparc64")
|
|
|
|
elseif (CRYPTOPP_MINGW32)
|
|
|
|
message(STATUS "Platform: MinGW-32")
|
|
|
|
elseif (CRYPTOPP_MINGW32)
|
|
|
|
message(STATUS "Platform: MinGW-64")
|
|
|
|
endif ()
|
|
|
|
if (CRYPTOPP_ARMV7A_NEON)
|
|
|
|
message(STATUS "NEON: TRUE")
|
|
|
|
endif ()
|
|
|
|
if (CRYPTOPP_NATIVE_ARCH)
|
|
|
|
message(STATUS "Native arch: TRUE")
|
|
|
|
else ()
|
|
|
|
message(STATUS "Native arch: FALSE")
|
|
|
|
endif ()
|
|
|
|
message(STATUS "Compiler: ${CMAKE_CXX_COMPILER}")
|
2016-09-15 06:20:15 +00:00
|
|
|
message(STATUS "Flags: ${CMAKE_CXX_FLAGS}")
|
2016-09-27 19:44:04 +00:00
|
|
|
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
2017-08-27 00:53:35 +00:00
|
|
|
endif ()
|