From 32bdc38400258b24edb37990cc8cba057a3297de Mon Sep 17 00:00:00 2001 From: Gil Date: Wed, 6 Dec 2017 16:10:59 -0800 Subject: 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. --- Firestore/CMakeLists.txt | 20 +++++++++++++++++--- Firestore/core/CMakeLists.txt | 16 ++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 Firestore/core/CMakeLists.txt (limited to 'Firestore') 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) -- cgit v1.2.3