Lines Matching full:cmake
2 # CMake integration
5 [CMake target](#cmake-target)<br>
7 [CMake project options](#cmake-project-options)<br>
10 Because we use CMake to build Catch2, we also provide a couple of
13 1) Catch2 exports a (namespaced) CMake target
14 2) Catch2's repository contains CMake scripts for automatic registration
17 ## CMake target
19 Catch2's CMake build exports an interface target `Catch2::Catch2`. Linking
25 ```cmake
33 ```cmake
40 Catch2's repository also contains two CMake scripts that help users
44 1) `Catch.cmake` (and its dependency `CatchAddTests.cmake`)
45 2) `ParseAndAddCatchTests.cmake`
49 to your CMake module path.
51 ### `Catch.cmake` and `CatchAddTests.cmake`
53 `Catch.cmake` provides function `catch_discover_tests` to get tests from
59 ```cmake
76 ```cmake
132 ### `ParseAndAddCatchTests.cmake`
142 ```cmake
170 file to `CMAKE_CONFIGURE_DEPENDS`. This means that the CMake configuration
178 ```cmake
185 ## CMake project options
187 Catch2's CMake project also provides some options for other projects
191 built. Defaults to `ON`. Note that Catch2 also obeys `BUILD_TESTING` CMake
213 $ cmake -Bbuild -H. -DBUILD_TESTING=OFF
214 $ sudo cmake --build build/ --target install
218 [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html)
220 [find_package](https://cmake.org/cmake/help/latest/command/find_package.html)