noloader / cryptopp-cmake

CMake files for Crypto++ project
BSD 3-Clause "New" or "Revised" License
92 stars 67 forks source link

CMake 3.10 or higher is required. You are running version 3.7.2 #13

Closed noloader closed 6 years ago

noloader commented 6 years ago

Testing on gcc117.fsffrance.org (Aarch64/ARMv8-a) results in:

CMake Error at CMakeLists.txt:22 (cmake_minimum_required):
  CMake 3.10 or higher is required.  You are running version 3.7.2

-- Configuring incomplete, errors occurred!

We are not administrators on the GCC Compile Farm. We cannot install software.

jcfr commented 6 years ago

Would it be possible to download cmake before configure/build/test of CryptoPP?

Here is an example of test script:

#!/usr/bin/env bash

set -xe

curl -LO -# https://cmake.org/files/v3.10/cmake-3.10.3-Linux-x86_64.tar.gz
tar -xf cmake-3.10.3-Linux-x86_64.tar.gz

export PATH=$(pwd)/cmake-3.10.3-Linux-x86_64/bin:$PATH

git clone https://github.com/weidai11/cryptopp
git clone https://github.com/noloader/cryptopp-cmake
mkdir cryptopp-build && cd $_
cmake -DBUILD_TESTING:BOOL=1 ../cryptopp-cmake
cmake --build . --config Release -- -j$(grep -c processor /proc/cpuinfo)
ctest
mouse07410 commented 6 years ago

Would it be possible to download cmake before configure/build/test of CryptoPP?

Crap. What you should do is relax the CMake requirement. I cannot believe you need the features that are only present in 3.10 and not in 3.7.

I can do it for you.

mouse07410 commented 6 years ago

Done.

noloader commented 6 years ago

Looks good. Thanks.

jcfr commented 6 years ago

cannot believe you need the features that are only present in 3.10 and not in 3.7

Generally speaking, requiring a newer version allows to keep the build system simpler and avoid work around.

When the build system will be simplified by introducing some more try_compile, it will be a good time to re-assess and require at least CMake >= 3.8 since it has an improved support for CXX_*_STANDARD and try_compile(), For more details, see https://cmake.org/cmake/help/v3.8/policy/CMP0067.html

mouse07410 commented 6 years ago

Generally speaking, requiring a newer version allows to keep the build system simpler and avoid work around.

I know that. It pays to consider other factors as well, such as the common platforms, etc.

To summarize: we disagree here (and I speak from experience). When the time comes to kill off an older platform, I will do that myself.