|
|
7236b9a |
diff -ur root-6.10.00.orig/cmake/modules/SearchInstalledSoftware.cmake root-6.10.00/cmake/modules/SearchInstalledSoftware.cmake
|
|
|
7236b9a |
--- root-6.10.00.orig/cmake/modules/SearchInstalledSoftware.cmake 2017-06-13 09:14:04.000000000 +0200
|
|
|
7236b9a |
+++ root-6.10.00/cmake/modules/SearchInstalledSoftware.cmake 2017-06-15 14:21:08.367446162 +0200
|
|
|
7236b9a |
@@ -1471,73 +1471,15 @@
|
|
|
7236b9a |
|
|
|
7236b9a |
#---Download googletest--------------------------------------------------------------
|
|
|
7236b9a |
if (testing)
|
|
|
7236b9a |
- # FIXME: Remove our version of gtest in roottest. We can reuse this one.
|
|
|
7236b9a |
- # Add gtest
|
|
|
7236b9a |
- # http://stackoverflow.com/questions/9689183/cmake-googletest
|
|
|
7236b9a |
-
|
|
|
7236b9a |
- set(_byproduct_binary_dir
|
|
|
7236b9a |
- ${CMAKE_CURRENT_BINARY_DIR}/googletest-prefix/src/googletest-build/googlemock/)
|
|
|
7236b9a |
- set(_byproducts
|
|
|
7236b9a |
- ${_byproduct_binary_dir}/gtest/libgtest.a
|
|
|
7236b9a |
- ${_byproduct_binary_dir}/gtest/libgtest_main.a
|
|
|
7236b9a |
- ${_byproduct_binary_dir}/libgmock.a
|
|
|
7236b9a |
- ${_byproduct_binary_dir}/libgmock_main.a
|
|
|
7236b9a |
- )
|
|
|
7236b9a |
-
|
|
|
7236b9a |
- ExternalProject_Add(
|
|
|
7236b9a |
- googletest
|
|
|
7236b9a |
- GIT_REPOSITORY https://github.com/google/googletest.git
|
|
|
7236b9a |
- GIT_TAG release-1.8.0
|
|
|
7236b9a |
- UPDATE_COMMAND ""
|
|
|
7236b9a |
- # TIMEOUT 10
|
|
|
7236b9a |
- # # Force separate output paths for debug and release builds to allow easy
|
|
|
7236b9a |
- # # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands
|
|
|
7236b9a |
- # CMAKE_ARGS -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=DebugLibs
|
|
|
7236b9a |
- # -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=ReleaseLibs
|
|
|
7236b9a |
- # -Dgtest_force_shared_crt=ON
|
|
|
7236b9a |
- CMAKE_ARGS -G ${CMAKE_GENERATOR}
|
|
|
7236b9a |
- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
|
|
7236b9a |
- -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
|
|
7236b9a |
- -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
|
|
|
7236b9a |
- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
|
|
7236b9a |
- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
|
|
7236b9a |
- -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
|
|
7236b9a |
- # Disable install step
|
|
|
7236b9a |
- INSTALL_COMMAND ""
|
|
|
7236b9a |
- BUILD_BYPRODUCTS ${_byproducts}
|
|
|
7236b9a |
- # Wrap download, configure and build steps in a script to log output
|
|
|
7236b9a |
- LOG_DOWNLOAD ON
|
|
|
7236b9a |
- LOG_CONFIGURE ON
|
|
|
7236b9a |
- LOG_BUILD ON)
|
|
|
7236b9a |
-
|
|
|
7236b9a |
- # Specify include dirs for gtest and gmock
|
|
|
7236b9a |
- ExternalProject_Get_Property(googletest source_dir)
|
|
|
7236b9a |
- set(GTEST_INCLUDE_DIR ${source_dir}/googletest/include)
|
|
|
7236b9a |
- set(GMOCK_INCLUDE_DIR ${source_dir}/googlemock/include)
|
|
|
7236b9a |
-
|
|
|
7236b9a |
- # Libraries
|
|
|
7236b9a |
- ExternalProject_Get_Property(googletest binary_dir)
|
|
|
7236b9a |
- set(_G_LIBRARY_PATH ${binary_dir}/googlemock/)
|
|
|
7236b9a |
-
|
|
|
7236b9a |
- # gtest
|
|
|
7236b9a |
- add_library(gtest IMPORTED STATIC GLOBAL)
|
|
|
7236b9a |
- set_property(TARGET gtest PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/gtest/libgtest.a)
|
|
|
7236b9a |
- add_dependencies(gtest googletest)
|
|
|
7236b9a |
-
|
|
|
7236b9a |
- # gtest_main
|
|
|
7236b9a |
- add_library(gtest_main IMPORTED STATIC GLOBAL)
|
|
|
7236b9a |
- set_property(TARGET gtest_main PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/gtest/libgtest_main.a)
|
|
|
7236b9a |
- add_dependencies(gtest_main googletest)
|
|
|
7236b9a |
+ set(_G_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/googlemock)
|
|
|
7236b9a |
|
|
|
7236b9a |
# gmock
|
|
|
7236b9a |
add_library(gmock IMPORTED STATIC GLOBAL)
|
|
|
7236b9a |
set_property(TARGET gmock PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/libgmock.a)
|
|
|
7236b9a |
- add_dependencies(gmock googletest)
|
|
|
7236b9a |
|
|
|
7236b9a |
# gmock_main
|
|
|
7236b9a |
add_library(gmock_main IMPORTED STATIC GLOBAL)
|
|
|
7236b9a |
set_property(TARGET gmock_main PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/libgmock_main.a)
|
|
|
7236b9a |
- add_dependencies(gmock_main googletest)
|
|
|
7236b9a |
|
|
|
7236b9a |
endif()
|
|
|
7236b9a |
|