Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 783138
Collapse All | Expand All

(-)a/cmake/modules/PrintableOptions.cmake (-11 / +10 lines)
Lines 19-58 Link Here
19
#    prints all the build options previously added with the above functions
19
#    prints all the build options previously added with the above functions
20
20
21
macro(add_printable_variable_bare _name)
21
macro(add_printable_variable_bare _name)
22
	if(_name STREQUAL "")
22
	if("${_name}" STREQUAL "")
23
		message(FATAL_ERROR "variable name cannot be empty")
23
		message(FATAL_ERROR "variable name cannot be empty")
24
	endif(_name STREQUAL "")
24
	endif("${_name}" STREQUAL "")
25
	list(APPEND _printable_options ${_name})
25
	list(APPEND _printable_options ${_name})
26
endmacro()
26
endmacro()
27
27
28
macro(add_printable_option _name _description _default_value)
28
macro(add_printable_option _name _description _default_value)
29
	if(_name STREQUAL "")
29
	if("${_name}" STREQUAL "")
30
		message(FATAL_ERROR "option name cannot be empty")
30
		message(FATAL_ERROR "option name cannot be empty")
31
	endif(_name STREQUAL "")
31
	endif("${_name}" STREQUAL "")
32
	option(${_name} ${_description} ${_default_value})
32
	option(${_name} ${_description} ${_default_value})
33
	add_printable_variable_bare(${_name})
33
	add_printable_variable_bare(${_name})
34
endmacro()
34
endmacro()
35
35
36
macro(add_printable_variable _name _description _default_value)
36
macro(add_printable_variable _name _description _default_value)
37
	if(_name STREQUAL "")
37
	if("${_name}" STREQUAL "")
38
		message(FATAL_ERROR "variable name cannot be empty")
38
		message(FATAL_ERROR "variable name cannot be empty")
39
	endif(_name STREQUAL "")
39
	endif("${_name}" STREQUAL "")
40
	set(${_name} ${_default_value} CACHE STRING ${_description})
40
	set(${_name} ${_default_value} CACHE STRING ${_description})
41
	add_printable_variable_bare(${_name})
41
	add_printable_variable_bare(${_name})
42
endmacro()
42
endmacro()
43
43
44
macro(add_printable_variable_path _name _description _default_value)
44
macro(add_printable_variable_path _name _description _default_value)
45
	if(_name STREQUAL "")
45
	if("${_name}" STREQUAL "")
46
		message(FATAL_ERROR "path variable name cannot be empty")
46
		message(FATAL_ERROR "path variable name cannot be empty")
47
	endif(_name STREQUAL "")
47
	endif("${_name}" STREQUAL "")
48
	set(${_name} ${_default_value} CACHE PATH ${_description})
48
	set(${_name} ${_default_value} CACHE PATH ${_description})
49
	add_printable_variable_bare(${_name})
49
	add_printable_variable_bare(${_name})
50
endmacro()
50
endmacro()
51
51
52
macro(add_printable_variable_filepath _name _description _default_value)
52
macro(add_printable_variable_filepath _name _description _default_value)
53
	if(_name STREQUAL "")
53
	if("${_name}" STREQUAL "")
54
		message(FATAL_ERROR "filepath variable name cannot be empty")
54
		message(FATAL_ERROR "filepath variable name cannot be empty")
55
	endif(_name STREQUAL "")
55
	endif("${_name}" STREQUAL "")
56
	set(${_name} ${_default_value} CACHE FILEPATH ${_description})
56
	set(${_name} ${_default_value} CACHE FILEPATH ${_description})
57
	add_printable_variable_bare(${_name})
57
	add_printable_variable_bare(${_name})
58
endmacro()
58
endmacro()
59
- 

Return to bug 783138