Skip to content

Commit 7892bae

Browse files
committed
ARROW-189: Fix darwin build.
GTest's ExternalProject needs to set some CXXFLAGS on Darwin and there were quoting issues.
1 parent 8630428 commit 7892bae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpp/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -474,19 +474,19 @@ if(ARROW_BUILD_TESTS)
474474

475475
if("$ENV{GTEST_HOME}" STREQUAL "")
476476
if(APPLE)
477-
set(GTEST_CMAKE_ARGS "-DCMAKE_CXX_FLAGS=\"-fPIC -std=c++11 -stdlib=libc++ -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-value -Wno-ignored-attributes\"")
477+
set(GTEST_CMAKE_CXX_FLAGS "-fPIC -std=c++11 -stdlib=libc++ -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-value -Wno-ignored-attributes")
478478
else()
479-
set(GTEST_CMAKE_ARGS "-DCMAKE_CXX_FLAGS=\"-fPIC\"")
479+
set(GTEST_CMAKE_CXX_FLAGS "-fPIC")
480480
endif()
481481

482482
ExternalProject_Add(googletest_ep
483483
URL "https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz"
484-
CMAKE_ARGS ${GTEST_CMAKE_ARGS}
484+
CMAKE_ARGS -DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}
485485
# googletest doesn't define install rules, so just build in the
486486
# source dir and don't try to install. See its README for
487487
# details.
488488
BUILD_IN_SOURCE 1
489-
INSTALL_COMMAND "/bin/true")
489+
INSTALL_COMMAND "")
490490

491491
set(GTEST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest_ep-prefix/src/googletest_ep")
492492
set(GTEST_INCLUDE_DIR "${GTEST_PREFIX}/include")

0 commit comments

Comments
 (0)