diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ecb7b07c..93bd9be9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,8 +111,8 @@ endif() option(USE_XMLLINT "Run xmllint to test if data/cameras.xml is valid" ON) option(USE_IWYU "Run iwyu tool when compiling sources" OFF) option(USE_CLANG_TIDY "Run clang-tidy tool when compiling sources" OFF) -option(BUILD_TESTING "Build the testing tree." ON) -if(BUILD_TESTING) +option(BUILD_RS_TESTING "Build the testing tree." ON) +if(BUILD_RS_TESTING) option(ALLOW_DOWNLOADING_GOOGLETEST "If googletest src tree is not found in location specified by GOOGLETEST_PATH, do fetch the archive from internet" OFF) else() set(ALLOW_DOWNLOADING_GOOGLETEST OFF CACHE BOOL "If googletest src tree is not found in location specified by GOOGLETEST_PATH, do fetch the archive from internet" FORCE) @@ -200,7 +200,7 @@ if((UNIX OR APPLE) AND USE_CLANG_TIDY) include(clang-tidy) endif() -if(BUILD_TESTING) +if(BUILD_RS_TESTING) enable_testing() endif() @@ -227,7 +227,7 @@ include(src-dependencies) add_subdirectory(src) -if(BUILD_TESTING) +if(BUILD_RS_TESTING) add_subdirectory(test) endif() @@ -245,7 +245,7 @@ if(BUILD_DOCS) add_subdirectory(docs) endif() -if(BUILD_TESTING AND RAWSPEED_COVERAGE_BUILD) +if(BUILD_RS_TESTING AND RAWSPEED_COVERAGE_BUILD) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") include(llvm-profdata) include(llvm-cov) diff --git a/cmake/Modules/GoogleTest.cmake.in b/cmake/Modules/GoogleTest.cmake.in index 8a8e17a6e..89e0ca9c0 100644 --- a/cmake/Modules/GoogleTest.cmake.in +++ b/cmake/Modules/GoogleTest.cmake.in @@ -31,7 +31,7 @@ if(EXISTS "${GOOGLETEST_PATH}" AND IS_DIRECTORY "${GOOGLETEST_PATH}" ) else() if(NOT ALLOW_DOWNLOADING_GOOGLETEST) - message(SEND_ERROR "Did not find Google Test sources! Either pass correct path in GOOGLETEST_PATH, or enable ALLOW_DOWNLOADING_GOOGLETEST, or disable BUILD_TESTING.") + message(SEND_ERROR "Did not find Google Test sources! Either pass correct path in GOOGLETEST_PATH, or enable ALLOW_DOWNLOADING_GOOGLETEST, or disable BUILD_RS_TESTING.") else() message(WARNING "Did not find Google Test sources! Fetching from web...") ExternalProject_Add( diff --git a/cmake/build-type.cmake b/cmake/build-type.cmake index 4c15761b6..853bb3538 100644 --- a/cmake/build-type.cmake +++ b/cmake/build-type.cmake @@ -4,7 +4,7 @@ if(NOT CMAKE_BUILD_TYPE) set(default_build_type "RelWithDebInfo") - if(BUILD_TESTING) + if(BUILD_RS_TESTING) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(default_build_type "Coverage") else() diff --git a/cmake/src-dependencies.cmake b/cmake/src-dependencies.cmake index 52e716cee..1b2c82c07 100644 --- a/cmake/src-dependencies.cmake +++ b/cmake/src-dependencies.cmake @@ -1,6 +1,6 @@ include(FeatureSummary) -if(BUILD_TESTING) +if(BUILD_RS_TESTING) # for the actual gtest: # at least in debian, they are the package only installs their source code, diff --git a/lnt/CMakeLists.txt b/lnt/CMakeLists.txt index 9d34676a7..2f787b5ea 100644 --- a/lnt/CMakeLists.txt +++ b/lnt/CMakeLists.txt @@ -12,7 +12,7 @@ get_filename_component(RAWSPEED_SOURCE_DIR "${RAWSPEED_LNT_SOURCE_DIR}/../" REAL # By default, try to build everything we possibly can. set(BUILD_TOOLS ON CACHE BOOL "") -set(BUILD_TESTING ON CACHE BOOL "") +set(BUILD_RS_TESTING ON CACHE BOOL "") set(BUILD_FUZZERS ON CACHE BOOL "") set(BUILD_BENCHMARKING ON CACHE BOOL "") @@ -21,7 +21,7 @@ set(BUILD_BENCHMARKING ON CACHE BOOL "") if(TEST_SUITE_BENCHMARKING_ONLY) set(BUILD_BENCHMARKING ON CACHE BOOL "" FORCE) - set(BUILD_TESTING OFF) + set(BUILD_RS_TESTING OFF) set(BUILD_FUZZERS OFF) # Only build stuff we will *REALLY* need. @@ -114,7 +114,7 @@ test_suite_add_build_dependencies(dependencies) if(TARGET benchmark) test_suite_add_build_dependencies(benchmark) endif() -if(BUILD_TESTING) +if(BUILD_RS_TESTING) test_suite_add_build_dependencies(gtest) test_suite_add_build_dependencies(gtest_main) test_suite_add_build_dependencies(gmock) diff --git a/src/utilities/identify/CMakeLists.txt b/src/utilities/identify/CMakeLists.txt index bea65e5db..1cf1fb566 100644 --- a/src/utilities/identify/CMakeLists.txt +++ b/src/utilities/identify/CMakeLists.txt @@ -16,7 +16,7 @@ endif() target_link_libraries(${rsidentify} rawspeed_get_number_of_processor_cores) -if(BUILD_TESTING) +if(BUILD_RS_TESTING) rawspeed_add_test(NAME utilities/${rsidentify} COMMAND ${rsidentify} WORKING_DIRECTORY "$") endif() diff --git a/src/utilities/rstest/CMakeLists.txt b/src/utilities/rstest/CMakeLists.txt index 02dfc3d86..5f91b5f23 100644 --- a/src/utilities/rstest/CMakeLists.txt +++ b/src/utilities/rstest/CMakeLists.txt @@ -1,4 +1,4 @@ -if(NOT BUILD_TESTING) +if(NOT BUILD_RS_TESTING) set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON) endif() @@ -11,7 +11,7 @@ endif() target_link_libraries(rstest rawspeed_get_number_of_processor_cores) -if(BUILD_TESTING) +if(BUILD_RS_TESTING) CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wno-suggest-attribute=const) CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wno-suggest-override) CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wno-missing-prototypes)