🎉 Added sonarcloud scan

This commit is contained in:
2022-05-12 13:23:47 +02:00
parent a254d89311
commit f508e54ab0
3 changed files with 69 additions and 1 deletions

View File

@ -1,6 +1,6 @@
set(Catch2_FOUND TRUE)
set(CATCH2_VERSION "v2.13.7")
set(CATCH2_VERSION "v2.13.9")
set(CATCH2_INCLUDEDIR "${CMAKE_BINARY_DIR}/catch-${CATCH2_VERSION}")
list(APPEND CMAKE_MODULE_PATH "${CATCH2_INCLUDEDIR}")
@ -8,6 +8,7 @@ if (NOT EXISTS "${CATCH2_INCLUDEDIR}/catch.hpp")
file(MAKE_DIRECTORY "${CATCH2_INCLUDEDIR}")
message(STATUS "Downloading catch.hpp from https://github.com/catchorg/Catch2/")
file(DOWNLOAD "https://github.com/catchorg/Catch2/releases/download/${CATCH2_VERSION}/catch.hpp" "${CATCH2_INCLUDEDIR}/catch.hpp")
file(DOWNLOAD "https://github.com/catchorg/Catch2/releases/download/${CATCH2_VERSION}/catch_reporter_sonarqube.hpp" "${CATCH2_INCLUDEDIR}/catch_reporter_sonarqube.hpp")
file(DOWNLOAD "https://cdn.statically.io/gh/catchorg/Catch2/${CATCH2_VERSION}/contrib/Catch.cmake" "${CATCH2_INCLUDEDIR}/Catch.cmake")
file(DOWNLOAD "https://cdn.statically.io/gh/catchorg/Catch2/${CATCH2_VERSION}/contrib/CatchAddTests.cmake" "${CATCH2_INCLUDEDIR}/CatchAddTests.cmake")
file(DOWNLOAD "https://cdn.statically.io/gh/catchorg/Catch2/${CATCH2_VERSION}/contrib/ParseAndAddCatchTests.cmake" "${CATCH2_INCLUDEDIR}/ParseAndAddCatchTests.cmake")