mirror of
https://github.com/libtom/libtomcrypt
synced 2026-08-25 20:26:07 -04:00
Bump required CMake version & DRY
* The oldest supported Ubuntu Version is 22.04 which comes with CMake 3.22. * Refactor demos/CMakeLists.txt to set the list of binaries only once. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
parent
d8a62f3367
commit
91757cf54d
4 changed files with 25 additions and 36 deletions
9
.ci/cmake.bat
Normal file
9
.ci/cmake.bat
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
if "Visual Studio 2017"=="%APPVEYOR_BUILD_WORKER_IMAGE%" goto :eof
|
||||
if "Visual Studio 2015"=="%APPVEYOR_BUILD_WORKER_IMAGE%" goto :eof
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Ninja" ..
|
||||
ninja
|
||||
cd..
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
# LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
project(
|
||||
libtomcrypt
|
||||
|
|
|
|||
13
appveyor.yml
13
appveyor.yml
|
|
@ -20,20 +20,13 @@ build_script:
|
|||
if "Visual Studio 2015"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
|
||||
cd..
|
||||
git clone https://github.com/libtom/libtommath.git --branch=master
|
||||
cp libtomcrypt\.ci\cmake.bat libtommath\cmake.bat
|
||||
cd libtommath
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Ninja" ..
|
||||
ninja
|
||||
cd..
|
||||
cmake.bat
|
||||
nmake -f makefile.msvc
|
||||
cd..
|
||||
cd libtomcrypt
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Ninja" ..
|
||||
ninja
|
||||
cd..
|
||||
.ci\cmake.bat
|
||||
nmake -f makefile.msvc all
|
||||
cp test.exe test-stock.exe
|
||||
cp timing.exe timing-stock.exe
|
||||
|
|
|
|||
|
|
@ -1,13 +1,6 @@
|
|||
# -----------------------------------------------------------------------------
|
||||
# Options
|
||||
# -----------------------------------------------------------------------------
|
||||
option(BUILD_USEFUL_DEMOS "Build useful demos (hashsum)" FALSE)
|
||||
option(
|
||||
BUILD_USABLE_DEMOS
|
||||
"Build usable demos (aesgcm constants crypt openssh-privkey openssl-enc latex-tables sizes timing)"
|
||||
FALSE
|
||||
)
|
||||
option(BUILD_TEST_DEMOS "Build test demos (small tv_gen)" FALSE)
|
||||
|
||||
option(INSTALL_DEMOS "Install enabled demos (USEFUL and/or USABLE) and ltc wrapper script" FALSE)
|
||||
|
||||
|
|
@ -16,11 +9,13 @@ option(INSTALL_DEMOS "Install enabled demos (USEFUL and/or USABLE) and ltc wrapp
|
|||
#
|
||||
# Demos that are even somehow useful and could be installed as a system-tool
|
||||
#
|
||||
# * USEFUL_DEMOS = hashsum
|
||||
# -----------------------------------------------------------------------------
|
||||
set(USEFUL_DEMOS hashsum)
|
||||
list(JOIN USEFUL_DEMOS " " USEFUL_DEMOS_STR)
|
||||
option(BUILD_USEFUL_DEMOS "Build useful demos (${USEFUL_DEMOS_STR})" FALSE)
|
||||
|
||||
if(BUILD_USEFUL_DEMOS)
|
||||
list(APPEND USABLE_DEMOS_TARGETS hashsum)
|
||||
list(APPEND USABLE_DEMOS_TARGETS ${USEFUL_DEMOS})
|
||||
endif()
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
|
@ -28,23 +23,13 @@ endif()
|
|||
#
|
||||
# Demos that are usable but only rarely make sense to be installed
|
||||
#
|
||||
# USEABLE_DEMOS = aesgcm constants crypt der_print_flexi latex-tables openssh-privkey openssl-enc sizes timing
|
||||
# -----------------------------------------------------------------------------
|
||||
set(USABLE_DEMOS aesgcm constants crypt der_print_flexi latex-tables openssh-privkey openssl-enc sizes timing)
|
||||
list(JOIN USABLE_DEMOS " " USABLE_DEMOS_STR)
|
||||
option(BUILD_USABLE_DEMOS "Build usable demos (${USABLE_DEMOS_STR})" FALSE)
|
||||
|
||||
if(BUILD_USABLE_DEMOS)
|
||||
list(
|
||||
APPEND
|
||||
USABLE_DEMOS_TARGETS
|
||||
aesgcm
|
||||
constants
|
||||
crypt
|
||||
der_print_flexi
|
||||
latex-tables
|
||||
openssh-privkey
|
||||
openssl-enc
|
||||
sizes
|
||||
timing
|
||||
)
|
||||
list(APPEND USABLE_DEMOS_TARGETS ${USABLE_DEMOS})
|
||||
endif()
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
|
@ -52,11 +37,13 @@ endif()
|
|||
#
|
||||
# Demos that are used for testing or measuring
|
||||
#
|
||||
# * TEST_DEMOS = small tv_gen
|
||||
# -----------------------------------------------------------------------------
|
||||
set(TEST_DEMOS small tv_gen)
|
||||
list(JOIN TEST_DEMOS " " TEST_DEMOS_STR)
|
||||
option(BUILD_TEST_DEMOS "Build test demos (${TEST_DEMOS_STR})" FALSE)
|
||||
|
||||
if(BUILD_TEST_DEMOS)
|
||||
list(APPEND ALL_DEMOS_TARGETS small tv_gen)
|
||||
list(APPEND ALL_DEMOS_TARGETS ${TEST_DEMOS})
|
||||
endif()
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue