CMake User Contributed Macros: Difference between revisions
No edit summary |
|||
Line 22: | Line 22: | ||
#[[CMakeUserFindQScintilla| Find QScintilla]] - [http://www.riverbankcomputing.com/software/qscintilla/ port to Qt of Neil Hodgson's Scintilla C++ editor control] | #[[CMakeUserFindQScintilla| Find QScintilla]] - [http://www.riverbankcomputing.com/software/qscintilla/ port to Qt of Neil Hodgson's Scintilla C++ editor control] | ||
[[CMake|Home]] [[CMake_User_Contributed_Macros|Back]] | [[CMake|Home]] [[CMake_User_Contributed_Macros|Back]] | ||
== Comprehensive Collection of CMake functions/macros == | |||
For CMake 2.8.7 and higher. | |||
More complex build scripts might need a larger toolset than is provided by CMake. Here is a tested collection of over 500 CMake functions which you can easily download and use by just including a single file in your CMakeLists.txt. | |||
Repository: [[https://github.com/toeb/oo-cmake| https://github.com/toeb/oo-cmake]] | |||
MIT License | |||
Some features | |||
* interactive cmake shell | |||
* eval | |||
* maps (objects without functions) | |||
** serialization to and from json | |||
* function functions | |||
** return values | |||
** dynamic call | |||
* objects | |||
* list tools | |||
** slice, splice, filter, map, fold | |||
* string tools | |||
** slice, splice, ... | |||
* semver | |||
** parse, compare, constrain semantic versions | |||
* shell tools | |||
* filesystem | |||
** many bash like functions which work on windows and unix systems(ls, touch, fwrite, fread, cd, pwd, pushd, popd, rm, ...) | |||
** read_line from console | |||
* debugging | |||
** breakpoint | |||
** print scope | |||
* ... | |||
An up to date full feature list and installation guide is located [[https://github.com/toeb/oo-cmake#feature-overview| here]] | |||
== Make Equivalents == | == Make Equivalents == |
Revision as of 16:49, 8 September 2014
User Contributed Macros
Find Modules
Although CMake comes with a whole bunch of FindXXX packages, there is a large number of packages there are not covered. The hope is that these user-contributed macros will eventually make their way into the official distribution. Before contributing, please have your FindXXX package conform to the CMake Module Guidelines.
- Find Autopack
- Find ClanLib
- Find DirectShow
- Find MySQL
- Find ParMetis
- Find VLD - Visual Leak Debugger
- Find WIX - Windows Installer XML,v2
- Find LibSVM - A Library for Support Vector Machines
- Find MuParser - High performance math expression parser library
- Find Octave - Interpreted language for numerical computations
- Use Bison - Parser Generator
- Use Flex - Lexer Generator
- Use LaTeX - Build LaTeX Documents
- Use RPM Tools - Build RPM (source or binary)
- Find CTPP2 - C++ Template Engine
- Find Qwt - Qt Widgets for Technical Applications
- Find QScintilla - port to Qt of Neil Hodgson's Scintilla C++ editor control
Comprehensive Collection of CMake functions/macros
For CMake 2.8.7 and higher. More complex build scripts might need a larger toolset than is provided by CMake. Here is a tested collection of over 500 CMake functions which you can easily download and use by just including a single file in your CMakeLists.txt.
Repository: [https://github.com/toeb/oo-cmake] MIT License
Some features
- interactive cmake shell
- eval
- maps (objects without functions)
- serialization to and from json
- function functions
- return values
- dynamic call
- objects
- list tools
- slice, splice, filter, map, fold
- string tools
- slice, splice, ...
- semver
- parse, compare, constrain semantic versions
- shell tools
- filesystem
- many bash like functions which work on windows and unix systems(ls, touch, fwrite, fread, cd, pwd, pushd, popd, rm, ...)
- read_line from console
- debugging
- breakpoint
- print scope
- ...
An up to date full feature list and installation guide is located [here]
Make Equivalents
While attempting to convert a gnu makefile to Cmake, there was a need to provide some macros to provide equivalent functionality.
Some helpers along the way
- COPY_IF_DIFFERENT
- MERGE --- Merges two sorted lists into a single sorted list. Useful to keep source and header files next to each other.
- CREATE_FINAL_FILE -- create a KDE style final file, which includes all source files, so that the compilation will be noticable faster.
- List Operations -- A compilation of some helpful list operations.
- PARSE_ARGUMENTS -- A macro to help parse arguments for other macros.
- ADD_CXXTEST -- A macro to add tests written the CxxTest testing framework.
- Force Flags -- A macro to force certain arguments for specified flag (similar to a set union).
- Test Inline -- A test for how your compiler defines inline.
- COMPARE_VERSION_STRINGS -- A macro to help compare arbitrary version strings for less than, equal to, and greater than.
See also the list of all macros in the CMake Macro category.
Visual Studio generator helpers
When generating Visual Studio projects, the priorities can be sometimes different than for other generators. These are some VS-specific (and sometimes not-so-specific) macros that could help you generate better VS projects.
- GatherProjectFiles -- create and cache a list of project files by recursively globbing a directory structure
- GenerateProject -- creates a VS project with subgroups that mimic the directory structure