buildAndTest.sh 582 B

12345678910111213141516171819
  1. #!/usr/bin/env sh
  2. # Start at the root of the Catch project directory, for example:
  3. # cd Catch2
  4. # begin-snippet: catch2-build-and-test
  5. # 1. Regenerate the amalgamated distribution
  6. ./tools/scripts/generateAmalgamatedFiles.py
  7. # 2. Configure the full test build
  8. cmake -Bdebug-build -H. -DCMAKE_BUILD_TYPE=Debug -DCATCH_DEVELOPMENT_BUILD=ON -DCATCH_BUILD_EXAMPLES=ON -DCATCH_BUILD_EXTRA_TESTS=ON -DCATCH_ENABLE_CONFIGURE_TESTS=ON
  9. # 3. Run the actual build
  10. cmake --build debug-build
  11. # 4. Run the tests using CTest
  12. cd debug-build
  13. ctest -j 4 --output-on-failure -C Debug
  14. # end-snippet