1
0
mirror of synced 2024-12-22 12:40:00 +01:00
Henry Schreiner 570c7b64bf
chore: bump to CMake 3.23
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-03-29 16:41:40 -04:00
..
2020-08-03 18:16:52 -04:00
2020-08-03 18:16:52 -04:00
2022-02-17 17:58:18 +02:00
2020-08-03 18:16:52 -04:00
2020-08-03 18:16:52 -04:00
2021-06-24 12:06:36 -04:00
2019-08-07 05:06:55 +00:00
2022-03-29 16:41:40 -04:00
2019-08-07 05:06:55 +00:00

This is an example project using CMake.

The requirements are:

  • CMake 3.11 or better; 3.14+ highly recommended.
  • A C++17 compatible compiler
  • The Boost libararies (header only part is fine)
  • Git
  • Doxygen (optional)

To configure:

cmake -S . -B build

Add -GNinja if you have Ninja.

To build:

cmake --build build

To test (--target can be written as -t in CMake 3.15+):

cmake --build build --target test

To build docs (requires Doxygen, output in build/docs/html):

cmake --build build --target docs

To use an IDE, such as Xcode:

cmake -S . -B xbuild -GXcode
cmake --open xbuild

The CMakeLists show off several useful design patters for CMake.