Skip to content

Commit

Permalink
find package for GTest
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-chrismc committed May 28, 2020
1 parent 041fd12 commit b6e1d4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
enable_testing()
include(GoogleTest)

find_package(GTest REQUIRED)

set(TEST_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/BaseTest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ClaimTest.cpp
Expand All @@ -15,6 +17,6 @@ target_compile_options(jwt-cpp-test PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/W4>
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -Wpedantic>
$<$<CXX_COMPILER_ID:Clang>:-Weverything>)
target_link_libraries(jwt-cpp-test PRIVATE jwt-cpp::jwt-cpp gtest gtest_main pthread)
target_link_libraries(jwt-cpp-test PRIVATE jwt-cpp::jwt-cpp GTest::GTest GTest::Main pthread)

gtest_add_tests(TARGET jwt-cpp-test)

0 comments on commit b6e1d4d

Please sign in to comment.