aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2017-12-06 16:10:59 -0800
committerGravatar GitHub <noreply@github.com>2017-12-06 16:10:59 -0800
commit32bdc38400258b24edb37990cc8cba057a3297de (patch)
tree1bf6bfda76e3fd5d0119d63d4544e9d6710ce264 /Firestore
parentcb5f3efd3ab53561afd7de625d16d014d14374dd (diff)
Rework the top-level cmake build to be a superproject (#538)
All projects are now ExternalProjects This makes it much easier to build them all in a single pass.
Diffstat (limited to 'Firestore')
-rw-r--r--Firestore/CMakeLists.txt20
-rw-r--r--Firestore/core/CMakeLists.txt16
2 files changed, 33 insertions, 3 deletions
diff --git a/Firestore/CMakeLists.txt b/Firestore/CMakeLists.txt
index 82e1903..6c2a32e 100644
--- a/Firestore/CMakeLists.txt
+++ b/Firestore/CMakeLists.txt
@@ -12,7 +12,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-include(${PROJECT_SOURCE_DIR}/cmake/external/googletest.cmake)
+cmake_minimum_required(VERSION 2.8.11)
+project(firestore)
-add_subdirectory(core/src/firebase/firestore/util)
-add_subdirectory(core/test/firebase/firestore/util)
+set(FIREBASE_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/..")
+include("${FIREBASE_SOURCE_DIR}/cmake/utils.cmake")
+
+find_package(GTest REQUIRED)
+
+# We use C++11
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
+# Fully qualified imports, project wide
+include_directories("${FIREBASE_SOURCE_DIR}")
+
+enable_testing()
+add_subdirectory(core)
diff --git a/Firestore/core/CMakeLists.txt b/Firestore/core/CMakeLists.txt
new file mode 100644
index 0000000..c49b6db
--- /dev/null
+++ b/Firestore/core/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Copyright 2017 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+add_subdirectory(src/firebase/firestore/util)
+add_subdirectory(test/firebase/firestore/util)