CMake: correct typos, compiler checks and message type

- Fix variable name typo in `buildinfo.cmake`.
- Use `CMAKE_CXX_COMPILER_ID` instead of `CMAKE_C_COMPILER_ID`
  when adding C++ compiler flags in `gflags` and `gtest`.
- Change message type from `ERROR` to `STATUS` for missing system Python
  in tests configuration, matching similar messages that aren't fatal.
This commit is contained in:
Campbell Barton 2026-01-26 02:21:42 +00:00
parent 9ffb9cdd64
commit 3720079292
4 changed files with 5 additions and 6 deletions

View file

@ -82,7 +82,7 @@ if(EXISTS ${SOURCE_DIR}/.git)
endif()
unset(_git_tag_hashes)
unset(_git_head_hashs)
unset(_git_head_hash)
endif()

View file

@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Too noisy for code we don't maintain.
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_cxx_flag("-Wno-cast-function-type")
endif()

View file

@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# avoid noisy warnings
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
remove_cc_flag(
"-Wmissing-declarations"
)

View file

@ -30,9 +30,8 @@ endif()
if(WITH_SYSTEM_PYTHON_TESTS)
if(NOT EXISTS "${TEST_SYSTEM_PYTHON_EXE}")
message(ERROR
"'System Python' tests requested but no valid system python path, "
"set TEST_SYSTEM_PYTHON_EXE."
message(STATUS
"Tests: Disabling 'System Python', no valid system python path, set TEST_SYSTEM_PYTHON_EXE."
)
set(WITH_SYSTEM_PYTHON_TESTS OFF)
endif()