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
Post a Comment