)
ENDIF()
- FIND_PROGRAM(GCOV_COMMAND NAMES gcov)
- IF(GCOV_COMMAND MATCHES "-NOTFOUND")
- MESSAGE(FATAL_ERROR "
-Coverage enabled but could not find the gcov executable. Please install
-gcov, which is part of the GNU Compiler Collection.
-"
- )
+ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ FIND_PROGRAM(GCOV_COMMAND NAMES llvm-cov)
+ SET(GCOV_COMMAND "${GCOV_COMMAND} gcov")
+ IF(GCOV_COMMAND MATCHES "-NOTFOUND")
+ MESSAGE(FATAL_ERROR "Coverage enabled but could not find the
+ llvm-cov executable, which is part of LLVM.")
+ ENDIF()
+ ELSE()
+ FIND_PROGRAM(GCOV_COMMAND NAMES gcov)
+ IF(GCOV_COMMAND MATCHES "-NOTFOUND")
+ MESSAGE(FATAL_ERROR "Coverage enabled but could not find the
+ gcov executable, which is part of the
+ GNU Compiler Collection.")
+ ENDIF()
ENDIF()
SET(CTEST_COVERAGE_COMMAND "${GCOV_COMMAND}")
IF(COVERAGE)
CREATE_TARGETDIRECTORIES_TXT()
MESSAGE("-- Running CTEST_COVERAGE()")
- CTEST_COVERAGE()
+ #CTEST_COVERAGE()
+ FILE(DOWNLOAD "https://codecov.io/bash" "${CMAKE_CURRENT_BINARY_DIR}/tests/codecov-bash")
+ EXECUTE_PROCESS(COMMAND bash "${CMAKE_CURRENT_BINARY_DIR}/tests/codecov-bash"
+ "-t ac85e7ce-5316-4bc1-a237-2fe724028c7b" "-x '${GCOV_COMMAND}'")
CLEAR_TARGETDIRECTORIES_TXT()
ENDIF(COVERAGE)
MESSAGE("-- Submission successful. Goodbye!")
ENDIF()
-# .oO( This script is freaky 584 lines long... )
+# .oO( This script is freaky 596 lines long... )