I think the option command is redundant because it can be replaced by the set command. What are the benefits I could get when I use the option command?
I think the option command is redundant because it can be replaced by the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A variable defined in an
optioncommand appears as a boolean choice in the CMake GUI or when running CMake interactively usingcmake -i. This is not the case for a variable defined usingsetunlessCACHEis used and the type is notINTERNAL.Also, the
CMakeDependentOptionmodule allows for specifying dependencies between options.