mirror of
https://github.com/firebase/firebase-ios-sdk
synced 2026-11-11 22:55:59 +05:45
Fix benchmark builds on non-Apple platforms (#1677)
This commit is contained in:
2 files changed
+22
-10
No files matched your search
@@ -12,12 +12,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cc_binary(
|
||||
firebase_firestore_util_string_apple_benchmark
|
||||
SOURCES
|
||||
string_apple_benchmark.mm
|
||||
DEPENDS
|
||||
benchmark
|
||||
benchmark_main
|
||||
firebase_firestore_util_base_apple
|
||||
)
|
||||
if(APPLE)
|
||||
cc_binary(
|
||||
firebase_firestore_util_string_apple_benchmark
|
||||
SOURCES
|
||||
string_apple_benchmark.mm
|
||||
DEPENDS
|
||||
benchmark
|
||||
benchmark_main
|
||||
firebase_firestore_util_base_apple
|
||||
)
|
||||
endif()
|
||||
+11
-1
@@ -18,6 +18,7 @@ include(CMakeParseArguments)
|
||||
# target
|
||||
# SOURCES sources...
|
||||
# DEPENDS libraries...
|
||||
# [EXCLUDE_FROM_ALL]
|
||||
# )
|
||||
#
|
||||
# Defines a new library target with the given target name, sources, and
|
||||
@@ -93,13 +94,15 @@ endfunction()
|
||||
# target
|
||||
# SOURCES sources...
|
||||
# DEPENDS libraries...
|
||||
# [EXCLUDE_FROM_ALL]
|
||||
# )
|
||||
#
|
||||
# Defines a new executable target with the given target name, sources, and
|
||||
# dependencies.
|
||||
function(cc_binary name)
|
||||
set(flag EXCLUDE_FROM_ALL)
|
||||
set(multi DEPENDS SOURCES)
|
||||
cmake_parse_arguments(ccb "" "" "${multi}" ${ARGN})
|
||||
cmake_parse_arguments(ccb "${flag}" "" "${multi}" ${ARGN})
|
||||
|
||||
maybe_remove_objc_sources(sources ${ccb_SOURCES})
|
||||
add_executable(${name} ${sources})
|
||||
@@ -108,6 +111,13 @@ function(cc_binary name)
|
||||
|
||||
target_include_directories(${name} PUBLIC ${FIREBASE_SOURCE_DIR})
|
||||
target_link_libraries(${name} ${ccb_DEPENDS})
|
||||
|
||||
if(ccb_EXCLUDE_FROM_ALL)
|
||||
set_property(
|
||||
TARGET ${name}
|
||||
PROPERTY EXCLUDE_FROM_ALL ON
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# cc_test(
|
||||
|
||||
Reference in new issue
Block a user