File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed
Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 11[submodule "vendor/jwt-cpp "]
22 path = vendor/jwt-cpp
33 url = https://github.com/Thalhammer/jwt-cpp.git
4+
5+ [submodule "vendor/gtest "]
6+ path = vendor/gtest
7+ url = https://github.com/google/googletest.git
8+ branch = v1.8.x
Original file line number Diff line number Diff line change 22cmake_minimum_required ( VERSION 2.6 )
33project ( scitokens-cpp )
44
5+ option ( BUILD_UNITTESTS "Build the scitokens-cpp unit tests" OFF )
6+
57set ( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} /cmake )
68
79find_package ( jwt-cpp REQUIRED )
@@ -68,6 +70,19 @@ if (NOT DEFINED INCLUDE_INSTALL_DIR)
6870 SET (INCLUDE_INSTALL_DIR "include" )
6971endif ()
7072
73+ if ( BUILD_UNITTESTS )
74+
75+ include (ExternalProject)
76+ ExternalProject_Add(gtest
77+ PREFIX external/gtest
78+ SOURCE_DIR ${PROJECT_SOURCE_DIR} /vendor/gtest
79+ BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR} /external/gtest/src/gtest-build /lib/libgtest.a
80+ INSTALL_COMMAND :
81+ )
82+
83+ enable_testing ()
84+ endif ()
85+
7186install (
7287 TARGETS SciTokens
7388 LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
You can’t perform that action at this time.
0 commit comments