![]() Then we also extended cmake-gui to be aware of this new property, and to use it to populate a drop-down combo box when a user wants to edit the cache entry’s value. Specifically, we added a STRINGS property, with the specific intent of providing a container for a list of the possible values that an otherwise free-form STRING cache entry was allowed to have. Starting with CMake 2.8.0, we extended the set_property command to enable adding properties to CMake CACHE variables. With CMake 2.8 and later, it is now possible to present this elegantly with a drop-down combo box appearing for each such cache entry in cmake-gui. Similar to a list of “enum” values for you C++-heads. Sometimes, as a the developer of a CMakeLists.txt file, you would like to present a cache entry whose potential values are restricted to a well-known set of strings. ![]() Each type of entry has its corresponding type of control: the file names have a browse-for-file control, the directory names have a browse-for-directory control, and the string entries have a free form text editing control. Using the CACHE form of the cmake SET command, you may add cache entries for file names, directory names, or arbitrary strings. Other types of cache entries may also appear in cmake-gui. The cmake-gui is tuned to present these options as checkbox controls: checked means the option is ON , unchecked means it is OFF . ![]() Using the CMake “option” command, it is trivial to add new options to your project. This option appears in cmake-gui as a checkbox. Otherwise, add_library calls default to producing static libraries. If set to ON , then add_library calls default to producing shared libraries. ![]() For example, a common option is BUILD_SHARED_LIBS . In cmake-gui, a list of CMake “options” and “cache entries” are presented to the developer building your project so they can make adjustments to various aspects of your project’s build. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |