Cleanup: CMake indentation & wrap long lines

This commit is contained in:
Campbell Barton
2025-05-20 11:20:09 +10:00
parent 29ab328f35
commit 7c668c0308
2 changed files with 22 additions and 17 deletions

View File

@@ -869,8 +869,8 @@ endif()
option(WITH_TESTS_EXPERIMENTAL "\
Run tests marked as experimental. \
These tests are labeled as such due to long runtime, flakey results, or other issues that make them unsuitable \
for blocking a build on."
These tests are labeled as such due to long runtime, flakey results,
or other issues that make them unsuitable for blocking a build on."
OFF
)
mark_as_advanced(WITH_TESTS_EXPERIMENTAL)
@@ -1037,33 +1037,38 @@ if(WITH_COMPILER_CODE_COVERAGE)
find_program(LLVM_COV "llvm-cov" ${COMPILER_DIRECTORY} NO_DEFAULT_PATH)
find_program(LLVM_PROFDATA "llvm-profdata" ${COMPILER_DIRECTORY} NO_DEFAULT_PATH)
if(NOT LLVM_COV OR NOT LLVM_PROFDATA)
message(WARNING "Could not find code coverage tools, disabling code coverage. You may explicitly specify LLVM_COV and LLVM_PROFDATA to work around this warning.")
set(WITH_COMPILER_CODE_COVERAGE OFF)
message(WARNING
"Could not find code coverage tools, disabling code coverage. "
"You may explicitly specify LLVM_COV and LLVM_PROFDATA to work around this warning."
)
set(WITH_COMPILER_CODE_COVERAGE OFF)
else()
set(_code_coverage_defaults "-fprofile-instr-generate -fcoverage-mapping")
endif()
else()
message(WARNING
"unsupported compiler ${CMAKE_C_COMPILER_ID} for WITH_COMPILER_CODE_COVERAGE, disabling."
"Unsupported compiler ${CMAKE_C_COMPILER_ID} for WITH_COMPILER_CODE_COVERAGE, disabling."
)
set(WITH_COMPILER_CODE_COVERAGE OFF)
endif()
# The code above could have disabled the feature, so check again.
if(WITH_COMPILER_CODE_COVERAGE)
set(COMPILER_CODE_COVERAGE_CFLAGS
${_code_coverage_defaults} CACHE STRING
"C flags for code coverage"
)
set(COMPILER_CODE_COVERAGE_CFLAGS
${_code_coverage_defaults} CACHE STRING
"C flags for code coverage"
)
mark_as_advanced(COMPILER_CODE_COVERAGE_CFLAGS)
set(COMPILER_CODE_COVERAGE_CXXFLAGS
${_code_coverage_defaults} CACHE STRING
"C++ flags for code coverage"
)
set(COMPILER_CODE_COVERAGE_CXXFLAGS
${_code_coverage_defaults} CACHE STRING
"C++ flags for code coverage"
)
mark_as_advanced(COMPILER_CODE_COVERAGE_CXXFLAGS)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(_code_coverage_dir_default "${CMAKE_BINARY_DIR}/coverage")
set(COMPILER_CODE_COVERAGE_DATA_DIR ${_code_coverage_dir_default} CACHE STRING "Directory for code coverage data")
set(COMPILER_CODE_COVERAGE_DATA_DIR ${_code_coverage_dir_default} CACHE STRING
"Directory for code coverage data"
)
mark_as_advanced(COMPILER_CODE_COVERAGE_DATA_DIR)
unset(_code_coverage_dir_default)
endif()
@@ -2533,10 +2538,10 @@ if(WITH_PYTHON)
set(_numpy_include "_core/include")
if(PYTHON_VERSION VERSION_LESS "3.13")
set(_numpy_include "core/include")
endif()
endif()
find_python_package(numpy "${_numpy_include}")
unset(_numpy_include)
endif()
endif()
endif()
if(WIN32 OR APPLE)