The value given to option is really only the "initial value" (transferred once to the cache during the first configuration step) and is afterwards meant to be changed by the user through CMake's GUI. The CMake command findpackage has two modes (Config mode and Module mode) to find and load the CMake configuration of an external project. But be aware, don't mistake the option with the set command.Mainly just cached strings that only can be ON or OFF and they allow some special handling like e.g.I would recommend to always set cmake_policy(SET CMP0054 NEW) to "only interpret if() arguments as variables or keywords when unquoted." The good news is that this was fixed in CMake 3.1 with the introduction of policy CMP0054.This argument supports generator expressions. CMAKECURRENTSOURCEDIR).If no BASEDIRS are specified when the file set is first created, the value of CMAKECURRENTSOURCEDIR is added. Any relative path is treated as relative to the current source directory (i.e. If the directory doesnt already exist CMake will make it. set¶ Set a normal, cache, or environment variable to a given value. An optional list of base directories of the file set. ⢠So the best solution here would be - see above - to directly check for if(MSVC) B , Path to directory which CMake will use as the root of build directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |