Merge pull request #7 from google/add_bypass_testing
Add option to bypass testing.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7d62eb3..3c06a1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,10 @@
option(securemessage_USE_LOCAL_PROTOBUF
"Use local copy of protobuf library and compiler" OFF)
+# Do not install gtest since we are embedding googletest.
+option(INSTALL_GTEST "Do not install gtest since we are embedding googletest" OFF)
+option(BYPASS_TESTING "Do not build or run tests" OFF)
+
include(cmake/proto_defs.cmake)
include(cmake/local_build_setup.cmake)
@@ -33,6 +37,10 @@
add_subdirectory(cpp)
add_subdirectory(proto)
-if (NOT TARGET gtest)
-add_subdirectory(third_party/gtest)
+
+if (NOT BYPASS_TESTING)
+ if (NOT TARGET gtest)
+ add_subdirectory(third_party/gtest)
+ endif()
endif()
+
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 20af9ff..80881db 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -14,4 +14,7 @@
set(SECUREMESSAGE_CPP_ROOT ${CMAKE_CURRENT_LIST_DIR})
add_subdirectory(src/securemessage)
-add_subdirectory(test/securemessage)
+
+if (NOT BYPASS_TESTING)
+ add_subdirectory(test/securemessage)
+endif()