Repository: parquet-cpp Updated Branches: refs/heads/master fdd8538bf -> 5ba8941de
PARQUET-962: [C++] GTEST_MAIN_STATIC_LIB is not defined in FindGTest.cmake Author: Deepak Majeti <[email protected]> Closes #306 from majetideepak/PARQUET-962 and squashes the following commits: 07926af [Deepak Majeti] mark as advanced 74a62b9 [Deepak Majeti] define GTEST_MAIN_STATIC_LIB in FindGTest.cmake Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/5ba8941d Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/5ba8941d Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/5ba8941d Branch: refs/heads/master Commit: 5ba8941de7aa8b2f3e34ae9a25fb50809d5de6b8 Parents: fdd8538 Author: Deepak Majeti <[email protected]> Authored: Thu Apr 20 21:37:02 2017 -0400 Committer: Wes McKinney <[email protected]> Committed: Thu Apr 20 21:37:02 2017 -0400 ---------------------------------------------------------------------- cmake_modules/FindGTest.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5ba8941d/cmake_modules/FindGTest.cmake ---------------------------------------------------------------------- diff --git a/cmake_modules/FindGTest.cmake b/cmake_modules/FindGTest.cmake index 3c5d2b6..c6a4238 100644 --- a/cmake_modules/FindGTest.cmake +++ b/cmake_modules/FindGTest.cmake @@ -28,6 +28,7 @@ # GTEST_INCLUDE_DIR, directory containing headers # GTEST_LIBS, directory containing gtest libraries # GTEST_STATIC_LIB, path to libgtest.a +# GTEST_MAIN_STATIC_LIB, path to libgtest_main.a # GTEST_SHARED_LIB, path to libgtest's shared library # GTEST_FOUND, whether gtest has been found @@ -43,7 +44,7 @@ if ( _gtest_roots ) find_path( GTEST_INCLUDE_DIR NAMES gtest/gtest.h PATHS ${_gtest_roots} NO_DEFAULT_PATH PATH_SUFFIXES "include" ) - find_library( GTEST_LIBRARIES NAMES gtest + find_library( GTEST_LIBRARIES NAMES gtest gtest_main PATHS ${_gtest_roots} NO_DEFAULT_PATH PATH_SUFFIXES "lib" ) else () @@ -57,6 +58,7 @@ if (GTEST_INCLUDE_DIR AND GTEST_LIBRARIES) get_filename_component( GTEST_LIBS ${GTEST_LIBRARIES} PATH ) set(GTEST_LIB_NAME libgtest) set(GTEST_STATIC_LIB ${GTEST_LIBS}/${GTEST_LIB_NAME}.a) + set(GTEST_MAIN_STATIC_LIB ${GTEST_LIBS}/${GTEST_LIB_NAME}_main.a) set(GTEST_SHARED_LIB ${GTEST_LIBS}/${GTEST_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) else () set(GTEST_FOUND FALSE) @@ -87,5 +89,6 @@ mark_as_advanced( GTEST_LIBS GTEST_LIBRARIES GTEST_STATIC_LIB + GTEST_MAIN_STATIC_LIB GTEST_SHARED_LIB )
