summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-11-12 21:27:52 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-11-12 21:29:56 (GMT)
commit45fb82483cdcdfe154ad0be63ff5729a68eb9439 (patch)
tree1b9dac277f3bf84fbbecfecb81348400e9b5e6f8 /Modules
parentdb984477e466761311b5e102e90793b3de27f9b5 (diff)
parent1c94129e98dfc9a56a3bb69e22f2b31cd1b9083e (diff)
downloadCMake-45fb82483cdcdfe154ad0be63ff5729a68eb9439.zip
CMake-45fb82483cdcdfe154ad0be63ff5729a68eb9439.tar.gz
CMake-45fb82483cdcdfe154ad0be63ff5729a68eb9439.tar.bz2
Merge topic 'CMakePrintHelpers'
1c94129e98 Help: correct macro -> function in CMakePrintHelpers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2596
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakePrintHelpers.cmake21
1 files changed, 11 insertions, 10 deletions
diff --git a/Modules/CMakePrintHelpers.cmake b/Modules/CMakePrintHelpers.cmake
index d5bbb4f..1af0bb7 100644
--- a/Modules/CMakePrintHelpers.cmake
+++ b/Modules/CMakePrintHelpers.cmake
@@ -5,32 +5,33 @@
CMakePrintHelpers
-----------------
-Convenience macros for printing properties and variables, useful e.g. for debugging.
+Convenience functions for printing properties and variables, useful
+e.g. for debugging.
::
- CMAKE_PRINT_PROPERTIES([TARGETS target1 .. targetN]
+ cmake_print_properties([TARGETS target1 .. targetN]
[SOURCES source1 .. sourceN]
[DIRECTORIES dir1 .. dirN]
[TESTS test1 .. testN]
[CACHE_ENTRIES entry1 .. entryN]
PROPERTIES prop1 .. propN )
-This macro prints the values of the properties of the given targets,
+This function prints the values of the properties of the given targets,
source files, directories, tests or cache entries. Exactly one of the
scope keywords must be used. Example::
- cmake_print_properties(TARGETS foo bar PROPERTIES
- LOCATION INTERFACE_INCLUDE_DIRS)
+ cmake_print_properties(TARGETS foo bar PROPERTIES
+ LOCATION INTERFACE_INCLUDE_DIRS)
This will print the LOCATION and INTERFACE_INCLUDE_DIRS properties for
both targets foo and bar.
+::
+ cmake_print_variables(var1 var2 .. varN)
-CMAKE_PRINT_VARIABLES(var1 var2 .. varN)
-
-This macro will print the name of each variable followed by its value.
+This function will print the name of each variable followed by its value.
Example::
cmake_print_variables(CMAKE_C_COMPILER CMAKE_MAJOR_VERSION DOES_NOT_EXIST)
@@ -40,7 +41,7 @@ Gives::
-- CMAKE_C_COMPILER="/usr/bin/gcc" ; CMAKE_MAJOR_VERSION="2" ; DOES_NOT_EXIST=""
#]=======================================================================]
-function(CMAKE_PRINT_VARIABLES)
+function(cmake_print_variables)
set(msg "")
foreach(var ${ARGN})
if(msg)
@@ -52,7 +53,7 @@ function(CMAKE_PRINT_VARIABLES)
endfunction()
-function(CMAKE_PRINT_PROPERTIES )
+function(cmake_print_properties)
set(options )
set(oneValueArgs )
set(multiValueArgs TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES )