From f65250a4e2b24670afb94a8d3a5ec12a0d4905ab Mon Sep 17 00:00:00 2001 From: Dragos Carp Date: Sat, 6 Aug 2016 18:21:07 +0200 Subject: [PATCH] Fix #11: DMD: enable MinSizeRel with -L-s --- cmake-d/Platform/Linux-dmd.cmake | 2 +- tests/run_tests_linux.sh | 38 +++++++++++++++++++++++++++----- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/cmake-d/Platform/Linux-dmd.cmake b/cmake-d/Platform/Linux-dmd.cmake index 2832b19..1cf610c 100644 --- a/cmake-d/Platform/Linux-dmd.cmake +++ b/cmake-d/Platform/Linux-dmd.cmake @@ -59,7 +59,7 @@ set(CMAKE_D_FLAGS_INIT "") set(CMAKE_D_LINK_FLAGS "") set(CMAKE_D_FLAGS_DEBUG_INIT "-g -debug -L--export-dynamic ${DDOC_FLAGS}") -# set(CMAKE_D_FLAGS_MINSIZEREL_INIT "-Os ${DDOC_FLAGS}") +set(CMAKE_D_FLAGS_MINSIZEREL_INIT "-O -L-s ${DDOC_FLAGS}") set(CMAKE_D_FLAGS_RELEASE_INIT "-O ${DDOC_FLAGS}") set(CMAKE_D_FLAGS_RELWITHDEBINFO_INIT "-O -g -L--export-dynamic ${DDOC_FLAGS}") # set(CMAKE_D_CREATE_PREPROCESSED_SOURCE " -E > ") diff --git a/tests/run_tests_linux.sh b/tests/run_tests_linux.sh index 2e25ae8..ea529a1 100755 --- a/tests/run_tests_linux.sh +++ b/tests/run_tests_linux.sh @@ -10,17 +10,43 @@ TEST_DIR=../../cmake-d-test-build rm -rf $TEST_DIR mkdir -p $TEST_DIR cd $TEST_DIR -mkdir -p release -cd release -# Do a release build + +# Do a unspecified build +mkdir -p unspecified +pushd unspecified cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR ../../cmake-d/tests make make test -cd .. +popd # Do a debug build mkdir -p debug -cd debug -cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_BUILD_TYPE=debug ../../cmake-d/tests +pushd debug +cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_BUILD_TYPE=Debug ../../cmake-d/tests make make test +popd + +# Do a release build +mkdir -p release +pushd release +cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR -DCMAKE_BUILD_TYPE=Release ../../cmake-d/tests +make +make test +popd + +# Do a relWithDebInfo build +mkdir -p relWithDebInfo +pushd relWithDebInfo +cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR -DCMAKE_BUILD_TYPE=RelWithDebInfo ../../cmake-d/tests +make +make test +popd + +# Do a minSizeRel build +mkdir -p minSizeRel +pushd minSizeRel +cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR -DCMAKE_BUILD_TYPE=MinSizeRel ../../cmake-d/tests +make +make test +popd