Skip to content
Snippets Groups Projects
Verified Commit 8c4d2410 authored by Hueser, Christian's avatar Hueser, Christian
Browse files

Update project dependencies like cmake and cpp

* Update information in file README and file CMakeLists.txt to use cmake
  3.26 and C++14.
* Add information on how to install cmake.
* Use different GoggleTest URL for newest Git tag v1.13.0.
parent 4ab99a02
No related branches found
No related tags found
No related merge requests found
......@@ -2,19 +2,19 @@
#
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.26)
project (helloWorld)
include_directories(${CMAKE_SOURCE_DIR})
add_subdirectory(src bin)
# GoogleTest requires at least C++11
set(CMAKE_CXX_STANDARD 11)
# GoogleTest requires at least C++14
set(CMAKE_CXX_STANDARD 14)
# Setup GoogleTest and build tests
# Setup GoogleTest v1.13.0 and build tests
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
URL https://github.com/google/googletest/archive/b796f7d44681514f58a683a3a71ff17c94edb0c1.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
......
......@@ -12,8 +12,14 @@ This project serves as a getting started demo for GitLab CI.
### Requirements
* CMake > 3.14.0
* C++ Compiler
* CMake >= 3.26.0
* C++ Compiler >= C++14
### Install Dependencies
```bash
$ pip install --upgrade cmake
```
### How to build the example
......@@ -21,8 +27,8 @@ From the project's main directory you can build and run the tests.
```bash
$ cmake -S . -B build
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
...
-- Build files have been written to: .../gitlab-ci-demo/build
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment