File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1717 build-and-test :
1818 name : Build and execute unit tests
1919
20- runs-on : ubuntu-22.04
20+ runs-on : ubuntu-latest
2121
2222 steps :
2323 - name : Install googletest
Original file line number Diff line number Diff line change 55# This file is part of FEDEM - https://openfedem.org
66
77# This cmake file adds the wrapper function add_cpp_test()
8- # which adds a C++ unit test using the google test framwork
9- # to the build project, if the googletest package is installed.
8+ # which adds a C++ unit test using the GoogleTest framework
9+ # to the build project, if that package is installed.
1010
11- # Needed to get google test working
11+ # Needed to get GoogleTest working
1212if ( POLICY CMP0057 )
1313 cmake_policy ( SET CMP0057 NEW ) # allow the IN_LIST keyword
1414endif ( POLICY CMP0057 )
@@ -19,7 +19,7 @@ if ( POLICY CMP0144 )
1919 cmake_policy ( SET CMP0144 OLD ) # ignoring <PACKAGE>_ROOT variables
2020endif ( POLICY CMP0144 )
2121
22- # Find the google unit testing framework
22+ # Find the GoogleTest framework for unit testing
2323find_path ( GTEST_ROOT gtest.h PATHS "$ENV{GTEST_ROOT} /include/gtest" )
2424if ( GTEST_ROOT )
2525 find_package ( GTest )
@@ -30,6 +30,8 @@ if ( GTest_FOUND )
3030 # Wrapper for gtest_add_tests
3131 function ( add_cpp_test TARGET )
3232 message ( STATUS "INFORMATION : Adding unit tests from ${TARGET} " )
33+ # GoogleTest now requires the C++17 standard
34+ set_property ( TARGET ${TARGET} PROPERTY CXX_STANDARD 17 )
3335 gtest_add_tests ( ${TARGET} "--srcdir=${CMAKE_CURRENT_SOURCE_DIR} " AUTO )
3436 if ( ${ARGC} GREATER 1 )
3537 target_link_libraries ( ${TARGET} ${ARGN} )
You can’t perform that action at this time.
0 commit comments