CMake: add boost_message_value as counterpart of boost_report_value.

The new function does not pass value through colormsg which
eats semi-colon and other CMake control characters.

[ci skip]
This commit is contained in:
Mateusz Łoskot
2015-11-07 18:53:05 +01:00
parent 540d332723
commit a84dade103
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -337,7 +337,7 @@ macro(soci_backend_test)
endif()
endif()
boost_report_value(${TEST_CONNSTR_VAR})
boost_message_value(${TEST_CONNSTR_VAR})
if( SOCI_SHARED )
# Shared libraries test
+8
View File
@@ -301,6 +301,14 @@ function(boost_report_value NAME)
colormsg("${NAME}${varpadding} = ${${NAME}}")
endfunction()
function(boost_message_value NAME)
string(LENGTH "${NAME}" varlen)
math(EXPR padding_len 40-${varlen})
string(SUBSTRING " "
0 ${padding_len} varpadding)
message(STATUS "${NAME}${varpadding} = ${${NAME}}")
endfunction()
function(trace NAME)
if(BOOST_CMAKE_TRACE)
string(LENGTH "${NAME}" varlen)