Merge pull request #14 from google/add_bypass-testing
Add option to bypass testing in CMakeLists.txt.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56adaf4..b4d99a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,10 @@
option(ukey2_USE_LOCAL_ABSL
"Use local copy of abseil-cpp library" OFF)
-
+
+option(BYPASS_TESTING
+ "Do not build or run tests" OFF)
+
include(cmake/proto_defs.cmake)
include(cmake/local_build_setup.cmake)
@@ -48,8 +51,11 @@
if (NOT TARGET securemessage)
add_subdirectory(third_party/secure_message)
endif()
-if (NOT TARGET gtest)
-add_subdirectory(third_party/gtest)
+
+if (NOT BYPASS_TESTING)
+ if (NOT TARGET gtest)
+ add_subdirectory(third_party/gtest)
+ endif()
endif()
install(DIRECTORY src/main/cpp/include/securegcm
diff --git a/src/main/cpp/CMakeLists.txt b/src/main/cpp/CMakeLists.txt
index 919e096..77d9d43 100644
--- a/src/main/cpp/CMakeLists.txt
+++ b/src/main/cpp/CMakeLists.txt
@@ -14,4 +14,8 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
add_subdirectory(src/securegcm)
-add_subdirectory(test/securegcm)
+
+if (NOT BYPASS_TESTING)
+ add_subdirectory(test/securegcm)
+endif()
+