Travis: Reenable building and running of examples. (#3351)
authorAina Niemetz <aina.niemetz@gmail.com>
Thu, 3 Oct 2019 19:41:40 +0000 (12:41 -0700)
committerGitHub <noreply@github.com>
Thu, 3 Oct 2019 19:41:40 +0000 (12:41 -0700)
.travis.yml
examples/CMakeLists.txt

index 64dd17c75b25d5ccc713f7beaf67d3d0d03e3b6c..505c69c54671a237453a7258174cf4d39221ace7 100644 (file)
@@ -57,21 +57,28 @@ script:
      exit 1;
    }
    makeCheck() {
-     cd build
-     make -j2 check ARGS='-LE regress[1-4]' CVC4_REGRESSION_ARGS='--no-early-exit' || error "BUILD/UNIT/SYSTEM/REGRESSION TEST FAILED"
+     (
+       cd build
+       make -j2 check ARGS='-LE regress[1-4]' CVC4_REGRESSION_ARGS='--no-early-exit' || error "BUILD/UNIT/SYSTEM/REGRESSION TEST FAILED"
+     )
    }
    makeExamples() {
-     cd examples
-     mkdir build
-     cd build
-     cmake .. -DCMAKE_PREFIX_PATH=$(pwd)/../../build/install/lib/cmake
-     ctest -j2 --output-on-failure || error "RUNNING EXAMPLES FAILED"
+     (
+       cd examples
+       mkdir build
+       cd build
+       cmake .. -DCMAKE_PREFIX_PATH=$(pwd)/../../build/install/lib/cmake
+       make -j2
+       ctest -j2 --output-on-failure || error "RUNNING EXAMPLES FAILED"
+     )
    }
    makeInstallCheck() {
-     cd build
-     make install -j2
-     echo -e "#include <cvc4/cvc4.h>\nint main() { CVC4::ExprManager em; return 0; }" > /tmp/test.cpp
-     $CXX -std=c++11 /tmp/test.cpp -I install/include -L install/lib -lcvc4 -lcln || exit 1
+     (
+       cd build
+       make install -j2
+       echo -e "#include <cvc4/cvc4.h>\nint main() { CVC4::ExprManager em; return 0; }" > /tmp/test.cpp
+       $CXX -std=c++11 /tmp/test.cpp -I install/include -L install/lib -lcvc4 -lcln || exit 1
+     )
    }
    run() {
      echo "travis_fold:start:$1"
index 43f4109a3047d1f0360222d842f291222685a816..893ea5c95dcd2dc88843d17390793e8b914196c9 100644 (file)
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.2)
 
 project(cvc4-examples)
 
+set(CMAKE_CXX_STANDARD 11)
+
 enable_testing()
 
 # Find CVC4 package. If CVC4 is not installed into the default system location