Browse Source

Travis: build in Release mode

Benoit Blanchon 7 năm trước cách đây
mục cha
commit
a0011ba7f8
2 tập tin đã thay đổi với 5 bổ sung3 xóa
  1. 5 2
      scripts/travis/cmake.sh
  2. 0 1
      test/CMakeLists.txt

+ 5 - 2
scripts/travis/cmake.sh

@@ -1,6 +1,6 @@
 #!/bin/sh -ex
 
-if [ $(uname) = 'Darwin' ]; then
+if [ "$(uname)" = 'Darwin' ]; then
 	URL=https://cmake.org/files/v3.4/cmake-3.4.3-Darwin-x86_64.tar.gz
 	CMAKE=/tmp/CMake.app/Contents/bin/cmake
 	CTEST=/tmp/CMake.app/Contents/bin/ctest
@@ -23,8 +23,11 @@ fi
 
 if [ -n "$SANITIZE" ]; then
 	export CXXFLAGS="-fsanitize=$SANITIZE"
+	BUILD_TYPE="Debug"
+else
+	BUILD_TYPE="Release"
 fi
 
-$CMAKE .
+$CMAKE -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
 $CMAKE --build .
 $CTEST --output-on-failure .

+ 0 - 1
test/CMakeLists.txt

@@ -24,7 +24,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
 		-Wshadow
 		-Wsign-promo
 		-Wstrict-aliasing
-		-Wstrict-overflow=5
 		-Wundef
 	)