|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- # CMake Modules
-
- Collection of usefull CMake modules.
-
- # Collection
-
- ## cmake_tests
-
- Add a `tests` target to automatically build and run all tests.
-
- **Usage:**
-
- Add a new test with name `fuu` that depends on target `bar`.
-
- ```cmake
- Add_CMake_Test ( NAME fuu
- TARGET bar
- [ GROUP baz ]
- [ COMMAND /bin/sh do_something ] )
-
- ```
-
- **Parameters**
-
- | Parameter | Description |
- | --- | --- |
- | `NAME <name>` | Name of the test. |
- | `TARGET <target>` | Taget the test depends on. |
- | `GROUP <group>` | Add the test to the passed group. |
- | `COMMAND <args..>` | Command to execute for testing. If no command is passed the passed target is executed. |
-
- ## find_local_modules
-
- Helper function to include a local module into the cmake environment.
-
- **Usage:**
-
- ```cmake
- FindLocalModule ( <module-name> <local-path> )
- ```
-
- **Parameters**
-
- | Parameter | Description |
- | --- | --- |
- | `<module-name>` | Name of the module to add to cmake environment. |
- | `<local-path>` | Path to the local module. |
-
- ## pedantic
-
- Helper functions to add pedantic flags to the compiler.
-
- **Pedantic_Apply_Flags:**
-
- Add pedantic flags to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`.
-
- ```cmake
- Pedantic_Apply_Flags ( [ C ]
- [ CXX ]
- [ ALL ]
- [ IGNORE <flags..> ]
- [ IGNORE_C <flags..> ]
- [ IGNORE_CXX <flags..> ]
- [ ADDITIONAL <flags..> ]
- [ ADDITIONAL_C <flags..> ]
- [ ADDITIONAL_CXX <flags..> ] )
- ```
-
- **Parameters:**
-
- | Parameter | Description |
- | --- | --- |
- | `C <flags..>` | Only add flags to the C compiler. |
- | `CXX <flags..>` | Only add flags to the C++ compiler. |
- | `ALL <flags..>` | Add flags to all compilers. |
- | `IGNORE <flags..>` | List of compiler flags to ignore. |
- | `IGNORE_C <flags..>` | List of C compiler flags to ignore. |
- | `IGNORE_CXX <flags..>` | List of C++ compiler flags to ignore. |
- | `ADDITIONAL <flags..>` | List of additional compiler flags to ignore. |
- | `ADDITIONAL_C <flags..>` | List of additional C compiler flags to ignore. |
- | `ADDITIONAL_CXX <flags..>` | List of additional C++ compiler flags to ignore. |
-
- **Pedantic_Apply_Flags_Target:**
-
- Add pedantic flags for compilers to the given target.
-
- ```cmake
- Pedantic_Apply_Flags_Target ( <target>
- [ C ]
- [ CXX ]
- [ ALL ]
- [ IGNORE <flags..> ]
- [ IGNORE_C <flags..> ]
- [ IGNORE_CXX <flags..> ]
- [ ADDITIONAL <flags..> ]
- [ ADDITIONAL_C <flags..> ]
- [ ADDITIONAL_CXX <flags..> ]
- [ VISIBILITY <PRIVATE|PUBLIC> ] )
- ```
-
- **Parameters:**
-
- | Parameter | Description |
- | --- | --- |
- | `<target>` | Target to add flags to. |
- | `C <flags..>` | Only add flags to the C compiler. |
- | `CXX <flags..>` | Only add flags to the C++ compiler. |
- | `ALL <flags..>` | Add flags to all compilers. |
- | `IGNORE <flags..>` | List of compiler flags to ignore. |
- | `IGNORE_C <flags..>` | List of C compiler flags to ignore. |
- | `IGNORE_CXX <flags..>` | List of C++ compiler flags to ignore. |
- | `ADDITIONAL <flags..>` | List of additional compiler flags to ignore. |
- | `ADDITIONAL_C <flags..>` | List of additional C compiler flags to ignore. |
- | `ADDITIONAL_CXX <flags..>` | List of additional C++ compiler flags to ignore. |
- | `VISIBILITY <PRIVATE|PUBLIC>` | Visibility to use to add flags to the target. |
-
- **Pedantic_Test_Flags:**
-
- Check if the passed flags are supported by the compiler.
-
- ```cmake
- Pedantic_Test_Flags ( <C|CXX> <out-var> <flags..> )
- ```
-
- **Parameters:**
-
- + `<C|CXX>` Compiler to use for checking the flags
- + `<out-var>` Name of the variable to store valid flags into.
- + `<flags..>` Flags to check.
-
- ## strip_symbols
-
- Strip thedebug symbols from the passed target.
-
- **Usage:**
-
- ```cmake
- Strip_Symbols ( <target> <output> )
- ```
-
- **Parameters**
-
- | Parameter | Description |
- | --- | --- |
- | `<target>` | Target to strip symbols from. |
- | `<output>` | Variable to store the path of the striped symbols to. |
-
- # Third Party
-
- + [sanitizers-cmake](https://github.com/arsenm/sanitizers-cmake)
- + Collection to add sanitizer support to cmake.
- + Is merged into this project.
- + Files:
- + asan-wrapper
- + FindASan.cmake
- + FindMSan.cmake
- + FindSanitizers.cmake
- + FindTSan.cmake
- + FindUBSan.cmake
- + sanitize-helpers.cmake
- + [cotire](https://github.com/sakra/cotire)
- + Collection to speed up the build process.
- + Is merged into this project.
- + Files:
- + cotire.cmake
|