Fix #11: DMD: enable MinSizeRel with -L-s

This commit is contained in:
Dragos Carp 2016-08-06 18:21:07 +02:00
parent 0dbc13fcb6
commit f65250a4e2
2 changed files with 33 additions and 7 deletions

View file

@ -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 "<CMAKE_D_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")

View file

@ -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