Skip to content

Commit d21b5f7

Browse files
committed
Disable tests and docs in Travis CI build
1 parent 221e923 commit d21b5f7

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

CMakeLists.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE STRING "CMake install prefi
2121
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "CMake debug suffix")
2222
set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "CMake RelWithDebInfo suffix")
2323
set(PDALC_ENABLE_CODE_COVERAGE ON CACHE BOOL "Enable code coverage calculation")
24+
set(PDALC_ENABLE_DOCS ON CACHE BOOL "Enable documentation generation")
25+
set(PDALC_ENABLE_TESTS ON CACHE BOOL "Enable pdal-c tests")
2426
set(PDALC_GCC_PARAM_GGC_MIN_HEAPSIZE "131072" CACHE STRING "GCC garbage collection minimum heap size")
2527

2628
include(ObtainProjectVersion)
@@ -29,7 +31,7 @@ include_directories("${CMAKE_SOURCE_DIR}/source")
2931
if(CMAKE_COMPILER_IS_GNUCXX)
3032
add_compile_options(--param ggc-min-heapsize=${PDALC_GCC_PARAM_GGC_MIN_HEAPSIZE})
3133

32-
if(PDALC_ENABLE_CODE_COVERAGE)
34+
if(PDALC_ENABLE_CODE_COVERAGE AND PDALC_ENABLE_TESTS)
3335
message(STATUS "Enabled code coverage analysis")
3436
include(CodeCoverage)
3537
APPEND_COVERAGE_COMPILER_FLAGS()
@@ -43,8 +45,13 @@ if(CMAKE_COMPILER_IS_GNUCXX)
4345
endif()
4446

4547
add_subdirectory("source/pdal")
46-
add_subdirectory("doc")
4748

48-
include(CTest)
49-
add_subdirectory("tests/data")
50-
add_subdirectory("tests/pdal")
49+
if(PDALC_ENABLE_DOCS)
50+
add_subdirectory("doc")
51+
endif()
52+
53+
if(PDALC_ENABLE_TESTS)
54+
include(CTest)
55+
add_subdirectory("tests/data")
56+
add_subdirectory("tests/pdal")
57+
endif()

source/pdal/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ set_target_properties(${TARGET} PROPERTIES
4949
)
5050

5151
# Measure code coverage on gcc
52-
if(CMAKE_COMPILER_IS_GNUCXX AND PDALC_ENABLE_CODE_COVERAGE)
52+
if(CMAKE_COMPILER_IS_GNUCXX AND PDALC_ENABLE_CODE_COVERAGE AND PDALC_ENABLE_TESTS)
5353
SETUP_TARGET_FOR_COVERAGE(
5454
NAME coverage_${TARGET}
5555
EXECUTABLE test_${TARGET}

tests/travis/script.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ echo "Building $CI_PROJECT_NAME ($TRAVIS_BRANCH-$TRAVIS_COMMIT) for $TARGET_PLAT
2323
rm -rf "$CI_PROJECT_DIR/build/$TARGET_PLATFORM"
2424
mkdir -p "$CI_PROJECT_DIR/build/$TARGET_PLATFORM"
2525
cd "$CI_PROJECT_DIR/build/$TARGET_PLATFORM"
26-
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPDALC_ENABLE_CODE_COVERAGE=OFF -DPDALC_GCC_PARAM_GGC_MIN_HEAPSIZE=8192 "${CI_PROJECT_DIR}"
26+
cmake -G "Unix Makefiles" \
27+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
28+
-DPDALC_ENABLE_CODE_COVERAGE=OFF \
29+
-DPDAL_ENABLE_DOCS=OFF \
30+
-DPDAL_ENABLE_TESTS=OFF \
31+
-DPDALC_GCC_PARAM_GGC_MIN_HEAPSIZE=8192 \
32+
"${CI_PROJECT_DIR}"
2733

2834
if [ "$SCAN" = "sonarcloud" ]; then
2935
${SONARCLOUD_DIR}/build-wrapper-linux-x86-64 --out-dir ${CI_PROJECT_DIR}/bw-output make

0 commit comments

Comments
 (0)