Skip to content

Commit

Permalink
Merge pull request #89 from olifre/adapt-ghaction-tests
Browse files Browse the repository at this point in the history
gh-action: Adapt unittests to renamed CMake flags, fix using external gtest.
  • Loading branch information
djw8605 authored Jun 22, 2022
2 parents e63ead3 + 8ae3cf7 commit 1613eb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_UNITTESTS=yes -DEXTERNAL_GTEST=${{ matrix.external-gtest }}
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSCITOKENS_BUILD_UNITTESTS=yes -DSCITOKENS_EXTERNAL_GTEST=${{ matrix.external-gtest }}

- name: Build
working-directory: ${{runner.workspace}}/build
Expand Down
4 changes: 3 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

add_executable(scitokens-gtest main.cpp)
add_dependencies(scitokens-gtest gtest)
if( NOT SCITOKENS_EXTERNAL_GTEST )
add_dependencies(scitokens-gtest gtest)
endif()
include_directories("${PROJECT_SOURCE_DIR}/vendor/gtest/googletest/include")

if(SCITOKENS_EXTERNAL_GTEST)
Expand Down

0 comments on commit 1613eb2

Please sign in to comment.