From b8460a7a1c983d83b2a9d90114fc576b754ae452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 11 Nov 2015 15:12:19 +0100 Subject: [PATCH] Test Builds with c++11 on mac --- .gitlab-ci.yml | 9 +++++++-- CI/ci-mac.sh | 16 ++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f96ead8..9ddd0cc2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,12 @@ clang-c++98: tags: - Linux -macos: - script: "CI/ci-mac.sh" +macos-c++11: + script: "CI/ci-mac.sh C++11" + tags: + - Apple + +macos-c++98: + script: "CI/ci-mac.sh C++98" tags: - Apple diff --git a/CI/ci-mac.sh b/CI/ci-mac.sh index 27772cb5..fc9b5ea8 100755 --- a/CI/ci-mac.sh +++ b/CI/ci-mac.sh @@ -1,8 +1,20 @@ #!/bin/bash +LANGUAGE=$1 + PATH=$PATH:/opt/local/bin export PATH +OPTIONS="" + +if [ "$LANGUAGE" == "C++98" ]; then + echo "Building with C++98"; +elif [ "$LANGUAGE" == "C++11" ]; then + echo "Building with C++11"; + OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++11' " +fi + + ######################################### # Build release version ######################################### @@ -13,7 +25,7 @@ fi cd build-release -cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_UNIT_TESTS=TRUE ../ +cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_UNIT_TESTS=TRUE $OPTIONS ../ #build it make @@ -44,7 +56,7 @@ fi cd build-debug -cmake -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_UNIT_TESTS=TRUE ../ +cmake -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_UNIT_TESTS=TRUE $OPTIONS ../ #build the unit tests make unittests