RIP
Tutorial
Tags
Topics
Examples
eBooks
Tutorial by Examples
Simple Macro to define a variable based on input
macro(set_my_variable _INPUT) if("${_INPUT}" STREQUAL "Foo") set(my_output_variable "foo") else() set(my_output_variable "bar") endif() endmacro(set_my_variable) Use the macro: set_my_variable("Foo") message(STATUS ${my_outpu...
Macro to fill a variable of given name
macro(set_custom_variable _OUT_VAR) set(${_OUT_VAR} "Foo") endmacro(set_custom_variable) Use it with set_custom_variable(my_foo) message(STATUS ${my_foo}) which will print -- Foo
Page 1 of 1
1
Cookie
This website stores cookies on your computer.
We use cookies to enhance your experience on our website and deliver personalized content.
For more details on our cookie usage, please review our
Cookie Policy
and
Privacy Policy
Accept all Cookies
Leave this website