mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
tests: scripts: fix test_cmake_out_of_source
By default C++ code would be compiled with GNU while C with Clang and this can create problems at link time. In order to prevent this we use Clang for both. Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
@@ -65,7 +65,9 @@ component_test_cmake_out_of_source () {
|
|||||||
mkdir "$OUT_OF_SOURCE_DIR"
|
mkdir "$OUT_OF_SOURCE_DIR"
|
||||||
cd "$OUT_OF_SOURCE_DIR"
|
cd "$OUT_OF_SOURCE_DIR"
|
||||||
# Note: Explicitly generate files as these are turned off in releases
|
# Note: Explicitly generate files as these are turned off in releases
|
||||||
cmake -D CMAKE_BUILD_TYPE:String=Check -D GEN_FILES=ON -D TEST_CPP=1 "$MBEDTLS_ROOT_DIR"
|
# Note: Use Clang compiler also for C++ (C uses it by default)
|
||||||
|
CXX=clang++ cmake -D CMAKE_BUILD_TYPE:String=Check -D GEN_FILES=ON \
|
||||||
|
-D TEST_CPP=1 "$MBEDTLS_ROOT_DIR"
|
||||||
make
|
make
|
||||||
|
|
||||||
msg "test: cmake 'out-of-source' build"
|
msg "test: cmake 'out-of-source' build"
|
||||||
|
Reference in New Issue
Block a user