c++ - Cmake option default value -


if have cmakelists.txt file:

cmake_minimum_required(version 2.8)  option(foo "foo option" off)  message("foo? " ${foo}) 

and call cmake on it, following output:

foo? on 

why this? haven't specified default foo off?

try this:

set(foo off cache bool "foo option") 

or

set(foo off cache bool "foo option" force) 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -