Reputation: 2356
I want to set configuration variable (path, in particular) in CMakeList.txt for my project, which user can override in CCmake.
But if i just use
set(VAR <value>)
VAR
is not available for changing in CCMAKE, how can i do that?
Upvotes: 3
Views: 2403
Reputation: 78280
If you add the CACHE
part to your set
command, it will be visible in CCMake. So, e.g.
set(VAR <value> CACHE PATH "Some details about VAR")
The types of variable which appear in CCMake are FILEPATH
, PATH
, STRING
and BOOL
.
For full details, run:
cmake --help-command set
Upvotes: 6