stamd

Static Markdown Page Generator
git clone git://git.dimitrijedobrota.com/stamd.git
Log | Files | Refs | README | LICENSE

BUILDING.md (1727B)


      1 # Building with CMake
      2 
      3 ## Build
      4 
      5 This project doesn't require any special command-line flags to build to keep
      6 things simple.
      7 
      8 Here are the steps for building in release mode with a single-configuration
      9 generator, like the Unix Makefiles one:
     10 
     11 ```sh
     12 cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
     13 cmake --build build
     14 ```
     15 
     16 Here are the steps for building in release mode with a multi-configuration
     17 generator, like the Visual Studio ones:
     18 
     19 ```sh
     20 cmake -S . -B build
     21 cmake --build build --config Release
     22 ```
     23 
     24 ### Building with MSVC
     25 
     26 Note that MSVC by default is not standards compliant and you need to pass some
     27 flags to make it behave properly. See the `flags-msvc` preset in the
     28 [CMakePresets.json](CMakePresets.json) file for the flags and with what
     29 variable to provide them to CMake during configuration.
     30 
     31 ### Building on Apple Silicon
     32 
     33 CMake supports building on Apple Silicon properly since 3.20.1. Make sure you
     34 have the [latest version][1] installed.
     35 
     36 ## Install
     37 
     38 This project doesn't require any special command-line flags to install to keep
     39 things simple. As a prerequisite, the project has to be built with the above
     40 commands already.
     41 
     42 The below commands require at least CMake 3.15 to run, because that is the
     43 version in which [Install a Project][2] was added.
     44 
     45 Here is the command for installing the release mode artifacts with a
     46 single-configuration generator, like the Unix Makefiles one:
     47 
     48 ```sh
     49 cmake --install build
     50 ```
     51 
     52 Here is the command for installing the release mode artifacts with a
     53 multi-configuration generator, like the Visual Studio ones:
     54 
     55 ```sh
     56 cmake --install build --config Release
     57 ```
     58 
     59 [1]: https://cmake.org/download/
     60 [2]: https://cmake.org/cmake/help/latest/manual/cmake.1.html#install-a-project