tumcms / Open-Infra-Platform

This is the official repository of the open-source Open Infra Platform software (as of April 2020).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Compiling an Unit Test fails with errors

christophKaiser opened this issue · comments

Describe the bug
Since the update to VS2019, compiling an Unit Test brings up the following error list:
grafik

To Reproduce
Steps to reproduce the behavior:

  1. In the Solution Explorer of Visual Studio 2019, go to OpenInfraPlatform/UnitTests/Schamas/IFC4x1
  2. Build one of the unit tests, in my example it's bspline-surface-with-knots
    (the unit test fixed-refernce-swept-area-solid brings up a similar list of errors)

Additional context
According to https://en.cppreference.com/w/cpp/types/result_of, std::result_of was removed by C++20 and replaced with std::invoke_result since C++17.
The file in which the error occurs is located at <build folder>\_deps\dep_gtest-src\googlemock\include\gmock\gmock-actions.h.

I guess we should update google test then.
I will take a look at it as soon as I find time.

To update google test, probably we have to change in /UnitTests/CMakeListis.txt the line 23 from
GIT_TAG release-1.10.0
to
GIT_TAG release-1.11.0.

However, even after this change gtest 1.10.0 is downloaded by the BlueFramework - see file <build-folder>\_deps\blue_framework-src\UnitTests\CMakeLists.txt, line 22. This happens before the unit tests of OIP want to download gtest (allmost at the end of CMake Configure), which causes no download of gtest 1.11.0 by unit tests of OIP (because some kind of gtest allready exists).

Yes the GIT_TAG is what we need to change.
Generally it's also no problem to make changes to the Blueframework.
We have to see if the update of gtest will require further changes to other parts of the code.