Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CMAKE.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,24 @@ Firebase-specific goodies:
* `-DWITH_TSAN=ON` -- enable the thread sanitizer (Clang, GCC)
* `-DWITH_UBSAN=ON` -- enable the undefined behavior sanitizer (Clang, GCC)

### What the CMake build covers

The CMake build covers Firestore's portable C++ core and its tests. It doesn't
build FirebaseCore, so on Apple platforms it uses the same implementations as on
Linux: logging to stdout and stderr, the empty credentials providers and the
no-op Firebase metadata provider. The parts of Firestore that need FirebaseCore
are built and tested by the Xcode and Swift Package Manager builds instead:

* the Objective-C and Swift layers and their tests,
* the Apple logger (`log_apple.mm`),
* the Auth and App Check credentials providers and the Firebase metadata
provider for Apple platforms, and their tests.

`FIRESTORE_INCLUDE_OBJC`, which used to build the Objective-C layer, is no
longer an option. Setting it to `OFF`, as
[firebase-cpp-sdk](https://github.com/firebase/firebase-cpp-sdk) does, still
works, and setting it to `ON` is an error.

For example:

On Mac or Linux:
Expand Down
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,4 @@ if(FIREBASE_IOS_BUILD_TESTS)
enable_testing()
endif()

add_subdirectory(FirebaseAppCheck/Interop)
add_subdirectory(FirebaseCore)
add_subdirectory(Firestore)
add_subdirectory(FirebaseAuth/Interop)
27 changes: 0 additions & 27 deletions FirebaseAppCheck/Interop/CMakeLists.txt

This file was deleted.

27 changes: 0 additions & 27 deletions FirebaseAuth/Interop/CMakeLists.txt

This file was deleted.

53 changes: 0 additions & 53 deletions FirebaseCore/CMakeLists.txt

This file was deleted.

24 changes: 18 additions & 6 deletions Firestore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Provide a mechanism for firebase-cpp-sdk to avoid unnecessarily building
# the Objective-C APIs and Tests, which it doesn't use.
option(FIRESTORE_INCLUDE_OBJC "Build the Firestore Objective-C layer" ON)
# The CMake build doesn't build FirebaseCore. On Apple platforms, Firestore uses
# the same portable implementations as on Linux: log_stdio, the empty
# credentials providers and the no-op Firebase metadata provider. The code that
# needs FirebaseCore (the Objective-C layer, log_apple.mm, and the Auth, App
# Check and Firebase metadata providers for Apple platforms) is built and tested
# by the Xcode and Swift Package Manager builds. See CMAKE.md.
#
# FIRESTORE_INCLUDE_OBJC used to build the Objective-C layer. It's no longer an
# option: builds that set it to OFF, such as firebase-cpp-sdk's, keep working,
# and ON is an error, because the Objective-C layer needs FirebaseCore.
if(FIRESTORE_INCLUDE_OBJC)
Comment thread
paulb777 marked this conversation as resolved.
Resolved
message(
FATAL_ERROR
"FIRESTORE_INCLUDE_OBJC isn't supported: the Objective-C layer needs "
"FirebaseCore, which the CMake build doesn't build. Use the Xcode or Swift "
"Package Manager builds for the Objective-C layer."
)
endif()

add_subdirectory(Protos)
add_subdirectory(Source)
add_subdirectory(core)
add_subdirectory(fuzzing)

add_subdirectory(Example)
52 changes: 0 additions & 52 deletions Firestore/Example/App/CMakeLists.txt

This file was deleted.

30 changes: 0 additions & 30 deletions Firestore/Example/Benchmarks/CMakeLists.txt

This file was deleted.

25 changes: 0 additions & 25 deletions Firestore/Example/CMakeLists.txt

This file was deleted.

29 changes: 0 additions & 29 deletions Firestore/Example/Tests/API/CMakeLists.txt

This file was deleted.

37 changes: 0 additions & 37 deletions Firestore/Example/Tests/Integration/CMakeLists.txt

This file was deleted.

40 changes: 0 additions & 40 deletions Firestore/Example/Tests/SpecTests/CMakeLists.txt

This file was deleted.

Loading
Loading