diff options
| author | mayeut <mayeut@users.noreply.github.com> | 2015-09-12 16:36:19 +0200 |
|---|---|---|
| committer | mayeut <mayeut@users.noreply.github.com> | 2015-09-12 16:36:19 +0200 |
| commit | fc131a1339fb9370f7bda8b68a1f4221d92dc6ad (patch) | |
| tree | 39bda1b69081940476c0a2f77ffe62ef0647282f /tools/ctest_scripts | |
| parent | 4f157f3cf00b14875c219f62a8c91bb3bab3977d (diff) | |
Travis ASan build
Diffstat (limited to 'tools/ctest_scripts')
| -rw-r--r-- | tools/ctest_scripts/travis-ci.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake index 4e6c50df..36596a09 100644 --- a/tools/ctest_scripts/travis-ci.cmake +++ b/tools/ctest_scripts/travis-ci.cmake @@ -40,6 +40,13 @@ if (NOT "$ENV{OPJ_CI_ARCH}" STREQUAL "") endif() endif() +if ("$ENV{OPJ_CI_ASAN}" STREQUAL "1") + set(OPJ_HAS_MEMCHECK TRUE) + set(CTEST_MEMORYCHECK_TYPE "AddressSanitizer") + set(CCFLAGS_ARCH "${CCFLAGS_ARCH} -g -fsanitize=address -fno-omit-frame-pointer") + +endif() + if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1") # To execute part of the encoding test suite, kakadu binaries are needed to decode encoded image and compare # it to the baseline. Kakadu binaries are freely available for non-commercial purposes @@ -108,6 +115,9 @@ ctest_read_custom_files(${CTEST_BINARY_DIRECTORY}) ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}") if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1") ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2) + if(OPJ_HAS_MEMCHECK) + ctest_memcheck(BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2) + endif() endif() if ("$ENV{OPJ_DO_SUBMIT}" STREQUAL "1") ctest_submit() |
