9
-D <var>:<type>=<value>
:創建cmake緩存條目。cmake的-D <var>:<type> = <value>:有什麼可以<type>呢?
確定,但有什麼可以<type>
呢?我見過BOOL,STRING,PATH,FILEPATH。該類型還有什麼?
-D <var>:<type>=<value>
:創建cmake緩存條目。cmake的-D <var>:<type> = <value>:有什麼可以<type>呢?
確定,但有什麼可以<type>
呢?我見過BOOL,STRING,PATH,FILEPATH。該類型還有什麼?
從CMake的手冊頁,在 「上高速緩存條目屬性」:
TYPE Widget type for entry in GUIs.
Cache entry values are always strings, but CMake GUIs present widgets to help users set values. The GUIs use this property as a hint to determine the widget type. Valid TYPE values are:
BOOL = Boolean ON/OFF value.
PATH = Path to a directory.
FILEPATH = Path to a file.
STRING = Generic string value.
INTERNAL = Do not present in GUI at all.
STATIC = Value managed by CMake, do not change.
UNINITIALIZED = Type not yet specified.
Generally the TYPE of a cache entry should be set by the command which creates it (set, option, find_library, etc.).