From 64f8d4e872845f804a60f13e457e4df62cfbab61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Almeida?= Date: Mon, 11 Dec 2023 16:12:43 +0000 Subject: [PATCH] Fixed Windows CI builds (#586) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Revert "Add gtest to Fetch content #550 (#551)" This reverts commit 70d59ed - breaking the windows builds * Fix CI for Windows builds --------- Co-authored-by: Gonçalo Almeida --- .github/workflows/c-cpp.yml | 17 +++++++++-------- CMakeLists.txt | 5 +---- README.md | 4 +++- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 0a23bdb49..78edc3ffd 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -28,11 +28,11 @@ jobs: sudo apt-get update -qq sudo apt-get install -y googletest asciidoc source-highlight doxygen graphviz - - name: Run CMake - run: | - cmake -Bbuild \ - -DBOOST_ROOT=/home/runner/boost/boost/ -DGTEST_ROOT=/usr/src/googletest/googletest/ -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/install . - cmake --build build -t all build_tests doc install + - name: Run CMake config + run: cmake -Bbuild -DBOOST_ROOT=/home/runner/boost/boost/ -DGTEST_ROOT=/usr/src/googletest/googletest/ -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/install . + + - name: Build CMake + run: cmake --build build -t all build_tests doc install - uses: actions/upload-artifact@v2 with: @@ -56,6 +56,7 @@ jobs: - uses: actions/checkout@v3 - name: Run CMake - run: | - cmake -Bbuild -D BOOST_ROOT=C:\runner\boost/boost\ . - cmake --build build + run: cmake -Bbuild -D BOOST_ROOT=C:\runner\boost/boost\ . + + - name: Build CMake + run: cmake --build build diff --git a/CMakeLists.txt b/CMakeLists.txt index ab399a69e..82ab4b3f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,10 +22,7 @@ if (NOT GTEST_ROOT) if (DEFINED ENV{GTEST_ROOT}) set(GTEST_ROOT $ENV{GTEST_ROOT}) else() - include(FetchContent) - FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.14.0) - FetchContent_Populate(googletest) - set(GTEST_ROOT ${googletest_SOURCE_DIR}) + set(GTEST_ROOT "n/a" CACHE STRING "Path to root folder of googletest. Must be set for building the tests.") endif() endif() diff --git a/README.md b/README.md index 3fc4c8d77..70be2290d 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,9 @@ Optional: - A C++14 enabled compiler is needed (default for gcc >= v6.1). - vsomeip uses CMake as buildsystem. - vsomeip uses Boost >= 1.55.0: -- Google's test framework (downloaded automaticaly) + +For the tests Google's test framework https://code.google.com/p/googletest/[gtest] is needed. +-- URL: https://googletest.googlecode.com/files/gtest-.zip To build the documentation asciidoc, source-highlight, doxygen and graphviz is needed: --`sudo apt-get install asciidoc source-highlight doxygen graphviz`