root/root-unbundle-gtest.patch
Mattias Ellert ea40f6d9b5 Update to 6.12.04
Drop patches accepted upstream
Drop previously backported patches
Unbundle jsroot in root-net-http
Add hack to work around broken charmaps in StandardSymbolsPS.otf
Use local static script and style files for JupyROOT
Fix some javascript errors
Fix build rules for test binaries so that they are not installed
Address memory usage issue for ARM build
Drop pre-minified javascript and style files (Fedora packaging guidelines)
Enable builds on ppc/ppc64/ppc64le (do not pass all tests, but the list
  of failing tests is much shorter with this release)
Add dependency on python[23]-jsmva to python[23]-jupyroot
New sub-packages: root-gui-canvaspainter, root-gui-webdisplay and
  root-hist-draw (not for EPEL 7 since they are root7 specific and
  require c++-14)
2018-01-17 07:13:04 +01:00

81 lines
3.8 KiB
Diff

diff -ur root-6.12.04.orig/cmake/modules/SearchInstalledSoftware.cmake root-6.12.04/cmake/modules/SearchInstalledSoftware.cmake
--- root-6.12.04.orig/cmake/modules/SearchInstalledSoftware.cmake 2017-12-13 08:27:42.000000000 +0100
+++ root-6.12.04/cmake/modules/SearchInstalledSoftware.cmake 2018-01-07 22:45:45.537658993 +0100
@@ -1580,71 +1580,18 @@
#---Download googletest--------------------------------------------------------------
if (testing)
- # FIXME: Remove our version of gtest in roottest. We can reuse this one.
- # Add googletest
- # http://stackoverflow.com/questions/9689183/cmake-googletest
+ # Workaround for missing libraries in Fedora's gmock packaging < 1.8.0
+ if(EXISTS ${CMAKE_SOURCE_DIR}/googlemock)
+ set(_G_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/googlemock)
- set(_gtest_byproduct_binary_dir
- ${CMAKE_CURRENT_BINARY_DIR}/googletest-prefix/src/googletest-build/googlemock/)
- set(_gtest_byproducts
- ${_gtest_byproduct_binary_dir}/gtest/libgtest.a
- ${_gtest_byproduct_binary_dir}/gtest/libgtest_main.a
- ${_gtest_byproduct_binary_dir}/libgmock.a
- ${_gtest_byproduct_binary_dir}/libgmock_main.a
- )
-
- if(MSVC)
- set(EXTRA_GTEST_OPTS
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=\\\"\\\"
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=\\\"\\\")
- endif()
-
- ExternalProject_Add(
- googletest
- GIT_REPOSITORY https://github.com/google/googletest.git
- GIT_TAG release-1.8.0
- UPDATE_COMMAND ""
- # TIMEOUT 10
- # # Force separate output paths for debug and release builds to allow easy
- # # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands
- # CMAKE_ARGS -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=DebugLibs
- # -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=ReleaseLibs
- # -Dgtest_force_shared_crt=ON
- CMAKE_ARGS -G ${CMAKE_GENERATOR}
- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
- -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
- -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
- -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
- ${EXTRA_GTEST_OPTS}
- # Disable install step
- INSTALL_COMMAND ""
- BUILD_BYPRODUCTS ${_gtest_byproducts}
- # Wrap download, configure and build steps in a script to log output
- LOG_DOWNLOAD ON
- LOG_CONFIGURE ON
- LOG_BUILD ON)
-
- # Specify include dirs for gtest and gmock
- ExternalProject_Get_Property(googletest source_dir)
- set(GTEST_INCLUDE_DIR ${source_dir}/googletest/include)
- set(GMOCK_INCLUDE_DIR ${source_dir}/googlemock/include)
-
- # Libraries
- ExternalProject_Get_Property(googletest binary_dir)
- set(_G_LIBRARY_PATH ${binary_dir}/googlemock/)
-
- # Register gtest, gtest_main, gmock, gmock_main
- foreach (lib gtest gtest_main gmock gmock_main)
+ # Register gmock, gmock_main
+ foreach (lib gmock gmock_main)
add_library(${lib} IMPORTED STATIC GLOBAL)
- add_dependencies(${lib} googletest)
endforeach()
- set_property(TARGET gtest PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/gtest/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX})
- set_property(TARGET gtest_main PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/gtest/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX})
set_property(TARGET gmock PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX})
set_property(TARGET gmock_main PROPERTY IMPORTED_LOCATION ${_G_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}gmock_main${CMAKE_STATIC_LIBRARY_SUFFIX})
+ endif()
endif()
#---Report non implemented options---------------------------------------------------