: "Cornelis Bockemühl"
An: "Andreas Naumann" , cmake@cmake.org
Betreff: Re: [CMake] conditions and included subprojects
Thanks for your proposals!
Actually my problem is basically that I want to keep up with some minimum good practice, but I am seeing myself throwing it o
Hello Cornelis,
I'm not sure if I get your use-case completely, but somtimes I also have the
need for three-state variables. What I usually do:
set(MY_OPTION "AUTO" CACHE STRING "Documentation for my option")
set_property(CACHE MY_OPTION STRINGS "ON:OFF:AUTO")
if("${MY_OPTION}" STREQUAL AUTO)
Thanks for your proposals!
Actually my problem is basically that I want to keep up with some
minimum good practice, but I am seeing myself throwing it over board
constantly if I do not find a logical solution after one or two hours
of struggling...
Your second option is close to what I am
Dear Cornelis,
your description looks to me like having a three valued option: ON, OFF, UNDEFINED. But an option in cmake language has only two values: ON or OFF.
To solve your problem with the connection between your sub-project and the main project, you should forget about the main