From 5fa70e1738902ea7cdec11f30622705c0d9a2149 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Mon, 6 Jun 2022 12:27:09 -0400 Subject: PrintHelpers: Rewrite a few more error messages --- Modules/CMakePrintHelpers.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Modules/CMakePrintHelpers.cmake b/Modules/CMakePrintHelpers.cmake index 0af2d3f..f40b06c 100644 --- a/Modules/CMakePrintHelpers.cmake +++ b/Modules/CMakePrintHelpers.cmake @@ -125,13 +125,14 @@ function(cmake_print_properties) endif() if(NOT mode) - message(FATAL_ERROR "Mode keyword missing in cmake_print_properties() call, must be one of TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES") + message(FATAL_ERROR "${_missing_mode_message}") return() endif() list(LENGTH mode modeLength) if("${modeLength}" GREATER 1) - message(FATAL_ERROR "Multiple mode keyword used in cmake_print_properties() call, it must be exactly one of TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES") + message(FATAL_ERROR + "Multiple mode keywords used in cmake_print_properties() call, there must be exactly one of ${_mode_names}.") return() endif() -- cgit v0.12