Skip to content
Tuong-Minh (Mike) Vo edited this page Dec 31, 2022 · 1 revision

Quick start

Prerequisites

Name Recommended version Notes
g++ 9.3.0 or higher
cmake 3.10.0 or higher
ninja 1.10.0 or higher
clangd 10.0.0 or higher Optional

Setting up development environment

  1. Clone this repository using git:

    • HTTPS

      git clone https://github.com/miketvo/rmit2022c-eeet2482-lodging-app.git
    • SSH

      git clone git@github.com:miketvo/rmit2022c-eeet2482-lodging-app.git

    Alternatively, you can download this repository as a ZIP file and extract it (not recommended for development purposes since git features are not enabled for this method).

  2. Initialize CMake and build folders:

    • Linux/MacOS

      ./init.sh
    • Windows

      ./init.ps1

    This will generate three build folders corresponding to three respective build modes offered in this project:

    • cmake-build-debug/
    • cmake-build-release/
    • cmake-build-minsizerel/

Building

  • Linux/MacOS

    ./build.sh [Options] -m <build-mode> 
  • Windows

    ./build.ps1 [Options] -m <build-mode> 

For all available option flags and build modes, use:

  • Linux/MacOS

    ./build.sh -h
  • Windows

    ./build.ps1 -h

Testing

  1. Make sure that the test binaries are built before testing:
    • Linux/MacOS

      ./build.sh -m <debug-test|release-test|minsizerel-test>
    • Windows

      ./build.ps1 -m <debug-test|release-test|minsizerel-test>
  2. Navigate to one of the build folders corresponding to the build mode specified in step 1:
    cd cmake-build-<debug|release|minsizerel>
    
  3. Run CTest (bundled with CMake) for the specified build folder in step 2:
    ctest

To run tests selectively, use the -R/--tests-regex or -N/--show-only flag. Refer to CTest Documentation for more instructions.

To write and add test configurations, please refer to Testing With CMake and CTest. Note: All test source files for this project are placed under test/.

Clone this wiki locally