CMake: pass a mode argument to message
While omitting the mode is supported it's generally better to clarify the purpose of a message.
This commit is contained in:
@@ -1025,7 +1025,7 @@ mark_as_advanced(WITH_COMPILER_CODE_COVERAGE)
|
||||
|
||||
if(WITH_COMPILER_CODE_COVERAGE)
|
||||
if(NOT CMAKE_COMPILER_IS_GNUCC)
|
||||
message("WITH_COMPILER_CODE_COVERAGE only works with GCC currently.")
|
||||
message(WARNING "WITH_COMPILER_CODE_COVERAGE only works with GCC currently.")
|
||||
set(WITH_COMPILER_CODE_COVERAGE OFF)
|
||||
endif()
|
||||
endif()
|
||||
@@ -2825,7 +2825,7 @@ if(FIRST_RUN)
|
||||
|
||||
info_cfg_text("")
|
||||
|
||||
message("${_config_msg}")
|
||||
message(STATUS "${_config_msg}")
|
||||
endif()
|
||||
|
||||
if(0)
|
||||
|
||||
@@ -47,7 +47,7 @@ if(UNIX)
|
||||
endif()
|
||||
|
||||
if(_software_missing)
|
||||
message(
|
||||
message(WARNING
|
||||
"\n"
|
||||
"Missing software for building Blender dependencies:\n"
|
||||
" ${_software_missing}\n"
|
||||
|
||||
@@ -31,9 +31,9 @@ function(download_source dep)
|
||||
message(FATAL_ERROR "${dep}_URI variable not set")
|
||||
endif()
|
||||
set(TARGET_FILE ${PACKAGE_DIR}/${TARGET_FILE})
|
||||
message("Checking source : ${dep} (${TARGET_FILE})")
|
||||
message(STATUS "Checking source : ${dep} (${TARGET_FILE})")
|
||||
if(NOT EXISTS ${TARGET_FILE})
|
||||
message("Checking source : ${dep} - source not found downloading from ${TARGET_URI}")
|
||||
message(STATUS "Checking source : ${dep} - source not found downloading from ${TARGET_URI}")
|
||||
file(
|
||||
DOWNLOAD ${TARGET_URI} ${TARGET_FILE}
|
||||
TIMEOUT 1800 # seconds
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
if(NOT DEFINED HARVEST_TARGET)
|
||||
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
|
||||
endif()
|
||||
message("HARVEST_TARGET = ${HARVEST_TARGET}")
|
||||
message(STATUS "HARVEST_TARGET = ${HARVEST_TARGET}")
|
||||
|
||||
if(WIN32)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(MSVC)
|
||||
message("BIN >${PYTHON_BINARY}<")
|
||||
message(STATUS "BIN >${PYTHON_BINARY}<")
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(NUMPY_DIR_POSTFIX -pydebug)
|
||||
set(NUMPY_ARCHIVE_POSTFIX d)
|
||||
|
||||
@@ -15,7 +15,7 @@ if(NOT BUILD_MODE)
|
||||
set(BUILD_MODE "Release")
|
||||
message(STATUS "Build type not specified: defaulting to a release build.")
|
||||
endif()
|
||||
message("BuildMode = ${BUILD_MODE}")
|
||||
message(STATUS "BuildMode = ${BUILD_MODE}")
|
||||
|
||||
if(BUILD_MODE STREQUAL "Debug")
|
||||
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
|
||||
@@ -35,11 +35,11 @@ file(TO_CMAKE_PATH ${PACKAGE_DIR} PACKAGE_DIR)
|
||||
set(PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches)
|
||||
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build)
|
||||
|
||||
message("LIBDIR = ${LIBDIR}")
|
||||
message("DOWNLOAD_DIR = ${DOWNLOAD_DIR}")
|
||||
message("PACKAGE_DIR = ${PACKAGE_DIR}")
|
||||
message("PATCH_DIR = ${PATCH_DIR}")
|
||||
message("BUILD_DIR = ${BUILD_DIR}")
|
||||
message(STATUS "LIBDIR = ${LIBDIR}")
|
||||
message(STATUS "DOWNLOAD_DIR = ${DOWNLOAD_DIR}")
|
||||
message(STATUS "PACKAGE_DIR = ${PACKAGE_DIR}")
|
||||
message(STATUS "PATCH_DIR = ${PATCH_DIR}")
|
||||
message(STATUS "BUILD_DIR = ${BUILD_DIR}")
|
||||
|
||||
if(WIN32)
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
|
||||
@@ -28,7 +28,7 @@ macro(download_package package_name)
|
||||
else()
|
||||
set(_final_url "https://projects.blender.org/blender/lib-windows_x64/media/branch/build_environment/${_file_name}")
|
||||
endif()
|
||||
message("Downloading ${_final_filename} from ${_final_url}")
|
||||
message(STATUS "Downloading ${_final_filename} from ${_final_url}")
|
||||
file(
|
||||
DOWNLOAD ${_final_url} ${_final_filename}
|
||||
TIMEOUT 1800 # seconds
|
||||
@@ -77,7 +77,7 @@ download_package(PERL)
|
||||
download_package(GAS)
|
||||
download_package(AR)
|
||||
|
||||
message("LIBDIR = ${LIBDIR}")
|
||||
message(STATUS "LIBDIR = ${LIBDIR}")
|
||||
macro(cmake_to_msys_path MsysPath ResultingPath)
|
||||
string(REPLACE ":" "" TmpPath "${MsysPath}")
|
||||
string(SUBSTRING ${TmpPath} 0 1 Drive)
|
||||
@@ -86,7 +86,7 @@ macro(cmake_to_msys_path MsysPath ResultingPath)
|
||||
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
|
||||
endmacro()
|
||||
cmake_to_msys_path(${LIBDIR} msys2_LIBDIR)
|
||||
message("msys2_LIBDIR = ${msys2_LIBDIR}")
|
||||
message(STATUS "msys2_LIBDIR = ${msys2_LIBDIR}")
|
||||
|
||||
# Make msys2 root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/msys2")
|
||||
@@ -99,14 +99,14 @@ endif()
|
||||
# Extract msys2
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd") AND
|
||||
(EXISTS "${MSYS2_BASE_FILE}"))
|
||||
message("Extracting msys2 base")
|
||||
message(STATUS "Extracting msys2 base")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${MSYS2_BASE_FILE}
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2
|
||||
)
|
||||
|
||||
# Start msys2 with command "exit" - does initial setup etc then exits
|
||||
message("Performing first-time load for msys2")
|
||||
message(STATUS "Performing first-time load for msys2")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c exit
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64
|
||||
@@ -124,14 +124,14 @@ endif()
|
||||
# If m4 isn't there, the others probably aren't either
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/m4.exe")
|
||||
# Refresh pacman repositories (similar to debian's `apt update`)
|
||||
message("Refreshing pacman")
|
||||
message(STATUS "Refreshing pacman")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c
|
||||
"pacman -Syy --noconfirm && exit"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64
|
||||
)
|
||||
|
||||
message("Installing required packages")
|
||||
message(STATUS "Installing required packages")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c
|
||||
"pacman -S patch m4 coreutils pkgconf make diffutils autoconf-wrapper --noconfirm && exit"
|
||||
@@ -158,7 +158,7 @@ endif()
|
||||
|
||||
# extract nasm
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/nasm.exe") AND (EXISTS "${MSYS2_NASM_FILE}"))
|
||||
message("Extracting nasm")
|
||||
message(STATUS "Extracting nasm")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${MSYS2_NASM_FILE}"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
|
||||
@@ -181,7 +181,7 @@ endif()
|
||||
|
||||
# extract perl
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/perl/portable.perl") AND (EXISTS "${MSYS2_PERL_FILE}"))
|
||||
message("Extracting perl")
|
||||
message(STATUS "Extracting perl")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${MSYS2_PERL_FILE}
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
|
||||
@@ -199,7 +199,7 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/gas-preprocessor.pl")
|
||||
endif()
|
||||
|
||||
# Get ar-lib
|
||||
message("Checking for ar-lib")
|
||||
message(STATUS "Checking for ar-lib")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/ar-lib")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
@@ -209,7 +209,7 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/ar-lib")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/ming64sh.cmd")
|
||||
message("Installing ming64sh.cmd")
|
||||
message(STATUS "Installing ming64sh.cmd")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${PATCH_DIR}/ming64sh.cmd
|
||||
|
||||
@@ -111,7 +111,7 @@ macro(GFLAGS_REPORT_NOT_FOUND REASON_MSG)
|
||||
else()
|
||||
# Neither QUIETLY nor REQUIRED, use no priority which emits a message
|
||||
# but continues configuration and allows generation.
|
||||
message("-- Failed to find gflags - " ${REASON_MSG} ${ARGN})
|
||||
message(STATUS "Failed to find gflags - " ${REASON_MSG} ${ARGN})
|
||||
endif()
|
||||
return()
|
||||
endmacro()
|
||||
|
||||
@@ -83,7 +83,7 @@ macro(GLOG_REPORT_NOT_FOUND REASON_MSG)
|
||||
else()
|
||||
# Neither QUIETLY nor REQUIRED, use no priority which emits a message
|
||||
# but continues configuration and allows generation.
|
||||
message("-- Failed to find glog - " ${REASON_MSG} ${ARGN})
|
||||
message(STATUS "Failed to find glog - " ${REASON_MSG} ${ARGN})
|
||||
endif()
|
||||
return()
|
||||
endmacro()
|
||||
|
||||
@@ -1275,7 +1275,7 @@ endmacro()
|
||||
function(print_all_vars)
|
||||
get_cmake_property(_vars VARIABLES)
|
||||
foreach(_var ${_vars})
|
||||
message("${_var}=${${_var}}")
|
||||
message(STATUS "${_var}=${${_var}}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(DEFINED MSVC_REDIST_DIR)
|
||||
file(TO_CMAKE_PATH ${MSVC_REDIST_DIR} MSVC_REDIST_DIR)
|
||||
else()
|
||||
message(
|
||||
message(WARNING
|
||||
"Unable to detect the Visual Studio redist directory, "
|
||||
"copying of the runtime dlls will not work, "
|
||||
"try running from the visual studio developer prompt."
|
||||
|
||||
Reference in New Issue
Block a user