cmake: example of macro for printing all cmake variables v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 24 Sep 2018 17:34:30 +0200
branchv_0
changeset 8 48fbdacec974
parent 7 59c936498ac0
child 9 d88df75dc2eb
cmake: example of macro for printing all cmake variables
src/CMakeLists.txt
--- a/src/CMakeLists.txt	Mon Sep 24 16:33:45 2018 +0200
+++ b/src/CMakeLists.txt	Mon Sep 24 17:34:30 2018 +0200
@@ -28,3 +28,16 @@
 # Link libraries:
 target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIB_READER_LIBRARIES})
 target_link_libraries(${EXECUTABLE_FILE} Qt5::Widgets)
+
+
+# Print all variables:
+#macro(print_all_variables)
+#	message(STATUS "print_all_variables------------------------------------------{")
+#	get_cmake_property(_variableNames VARIABLES)
+#	foreach (_variableName ${_variableNames})
+#		message(STATUS "${_variableName}=${${_variableName}}")
+#	endforeach()
+#	message(STATUS "print_all_variables------------------------------------------}")
+#endmacro()
+#
+#print_all_variables()