summaryrefslogtreecommitdiffstats
path: root/src/cmake/message.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmake/message.cmake')
-rw-r--r--src/cmake/message.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cmake/message.cmake b/src/cmake/message.cmake
index faee00091a2..fb740fdf7d9 100644
--- a/src/cmake/message.cmake
+++ b/src/cmake/message.cmake
@@ -34,3 +34,18 @@ function(message)
endif()
endfunction()
+##############################################################################
+# aligned config output
+##############################################################################
+function(pr desc val)
+ string(ASCII 27 esc)
+ set(reset "${esc}[m")
+ set(cyan "${esc}[36m")
+
+ string(LENGTH ${desc} len)
+ while (len LESS 20)
+ set (desc "${desc} ")
+ string(LENGTH ${desc} len)
+ endwhile()
+ _message("${cyan}${desc}${reset}: ${val}")
+endfunction()