Skip to content

Commit 1235a7c

Browse files
committed
Also update aws-lc-fips-sys CMakeLists.txt
1 parent 36b8066 commit 1235a7c

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

.github/docker_images/cmake_build_versions/aws_lc_rs_build.sh

+13-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
set -ex -o pipefail
77

88
echo "Building with CMake Version: $(cmake --version)"
9+
FIPS_BUILD=1
10+
if cmake --version | grep -q " 4."; then
11+
echo "CMake version is 4.x, skipping FIPS build"
12+
FIPS_BUILD=0
13+
fi
914

1015
. "${HOME}/.cargo/env"
1116
SRC_DIR="${SRC_DIR:-/aws_lc_rs}"
@@ -15,11 +20,16 @@ pushd "${SRC_DIR}"
1520
cargo clean
1621
cargo test -p aws-lc-rs --features=unstable
1722
cargo clean
18-
cargo test -p aws-lc-rs --features=unstable,fips
19-
cargo clean
23+
if [ ${FIPS_BUILD} -eq 1 ]; then
24+
cargo test -p aws-lc-rs --features=unstable,fips
25+
cargo clean
26+
fi
2027
cargo test -p aws-lc-rs --release --features=unstable
2128
cargo clean
22-
cargo test -p aws-lc-rs --release --features=unstable,fips
29+
if [ ${FIPS_BUILD} -eq 1 ]; then
30+
cargo test -p aws-lc-rs --release --features=unstable,fips
31+
cargo clean
32+
fi
2333

2434

2535
popd # ${BUILD_DIR}

aws-lc-fips-sys/CMakeLists.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0 OR ISC
33

4-
cmake_minimum_required(VERSION 3.0)
4+
cmake_minimum_required(VERSION 3.5...3.31)
5+
6+
if(CMAKE_VERSION VERSION_GREATER "3.14")
7+
# https://cmake.org/cmake/help/latest/policy/CMP0091.html
8+
# In CMake 3.14 and below, MSVC runtime library selection flags are added to the default CMAKE_<LANG>_FLAGS_<CONFIG>
9+
# cache entries by CMake automatically.
10+
cmake_policy(SET CMP0091 OLD)
11+
endif()
512

613
project(AWS_LC_RUST NONE)
714
enable_language(C)

0 commit comments

Comments
 (0)