CMake User Contributed Macros: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(Added link for Compare Version Strings.)
(typo: ADD_CXXTEXT to ADD_CXXTEST)
Line 32: Line 32:
#[[CMakeMacroListOperations | List Operations]] -- A compilation of some helpful list operations.
#[[CMakeMacroListOperations | List Operations]] -- A compilation of some helpful list operations.
#[[CMakeMacroParseArguments | PARSE_ARGUMENTS]] -- A macro to help parse arguments for other macros.
#[[CMakeMacroParseArguments | PARSE_ARGUMENTS]] -- A macro to help parse arguments for other macros.
#[[CMakeMacroAddCxxTest | ADD_CXXTEXT]] -- A macro to add tests written the CxxTest testing framework.
#[[CMakeMacroAddCxxTest | ADD_CXXTEST]] -- A macro to add tests written the CxxTest testing framework.
#[[CMakeMacroForceAddFlags | Force Flags]] -- A macro to force certain arguments for specified flag (similar to a set union).
#[[CMakeMacroForceAddFlags | Force Flags]] -- A macro to force certain arguments for specified flag (similar to a set union).
#[[CMakeTestInline | Test Inline]] -- A test for how your compiler defines inline.
#[[CMakeTestInline | Test Inline]] -- A test for how your compiler defines inline.

Revision as of 16:04, 26 May 2008

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.

  1. Find Autopack
  2. Find ClanLib
  3. Find DirectShow
  4. Find MySQL
  5. Find ParMetis
  6. Find VLD - Visual Leak Debugger
  7. Use Bison - Parser Generator
  8. Use Flex - Lexer Generator
  9. Use LaTeX - Build LaTeX Documents
  10. Use RPM Tools - Build RPM (source or binary)

Home Back

Make Equivalents

While attempting to convert a gnu makefile to Cmake, there was a need to provide some macros to provide equivalent functionality.

  1. FILTER_OUT (filter-out)
  2. CREATE_LIBTOOL_FILE (create a libtool archive file)

Home Back

Some helpers along the way

  1. COPY_IF_DIFFERENT
  2. MERGE --- Merges two sorted lists into a single sorted list. Useful to keep source and header files next to each other.
  3. CREATE_FINAL_FILE -- create a KDE style final file, which includes all source files, so that the compilation will be noticable faster.
  4. List Operations -- A compilation of some helpful list operations.
  5. PARSE_ARGUMENTS -- A macro to help parse arguments for other macros.
  6. ADD_CXXTEST -- A macro to add tests written the CxxTest testing framework.
  7. Force Flags -- A macro to force certain arguments for specified flag (similar to a set union).
  8. Test Inline -- A test for how your compiler defines inline.
  9. 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.

Home Back

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.

  1. GatherProjectFiles -- create and cache a list of project files by recursively globbing a directory structure
  2. GenerateProject -- creates a VS project with subgroups that mimic the directory structure


Home Back



CMake: [Welcome | Site Map]