2 * Copyright 2017 Google
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef Firebase_VERSION
18 #error "Firebase_VERSION is not defined: add -DFirebase_VERSION=... to the build invocation"
21 #ifndef FIRCore_VERSION
22 #error "FIRCore_VERSION is not defined: add -DFIRCore_VERSION=... to the build invocation"
25 // The following two macros supply the incantation so that the C
26 // preprocessor does not try to parse the version as a floating
28 // https://www.guyrutenberg.com/2008/12/20/expanding-macros-into-string-constants-in-c/
29 #define STR(x) STR_EXPAND(x)
30 #define STR_EXPAND(x) #x
32 const char *const FIRVersionString = (const char *const)STR(Firebase_VERSION);
33 const char *const FIRCoreVersionString = (const char *const)STR(FIRCore_VERSION);