openbsd-ports/math/eigen3/patches/patch-cmake_FindGoogleHash_cmake
zhuk 064217f74c Eigen is a C++ template library for vector and matrix math.
Unlike most other linear algebra libraries, Eigen focuses on the
simple mathematical needs of applications: games and other OpenGL
apps, spreadsheets and other office apps, etc. Eigen is dedicated
to providing optimal speed with GCC.

This is used by some KDE applications. Probably some other ports will
pick up Eigen3, too, this will be dealt soon.

okay landry@
2014-07-10 08:59:52 +00:00

34 lines
1.6 KiB
Plaintext

$OpenBSD: patch-cmake_FindGoogleHash_cmake,v 1.1.1.1 2014/07/10 08:59:52 zhuk Exp $
Fix configure check.
--- cmake/FindGoogleHash.cmake.orig Tue Jul 30 15:24:36 2013
+++ cmake/FindGoogleHash.cmake Tue Jul 30 15:24:20 2013
@@ -1,4 +1,7 @@
+include(CMakePushCheckState)
+include(CheckCXXSourceCompiles)
+
if (GOOGLEHASH_INCLUDES AND GOOGLEHASH_LIBRARIES)
set(GOOGLEHASH_FIND_QUIETLY TRUE)
endif (GOOGLEHASH_INCLUDES AND GOOGLEHASH_LIBRARIES)
@@ -9,12 +12,16 @@ find_path(GOOGLEHASH_INCLUDES
PATHS
${INCLUDE_INSTALL_DIR}
)
+message(STATUS "GOOGLEHASH_INCLUDES: ${GOOGLEHASH_INCLUDES}")
if(GOOGLEHASH_INCLUDES)
- # let's make sure it compiles with the current compiler
- file(WRITE ${CMAKE_BINARY_DIR}/googlehash_test.cpp
- "#include <google/sparse_hash_map>\n#include <google/dense_hash_map>\nint main(int argc, char** argv) { google::dense_hash_map<int,float> a; google::sparse_hash_map<int,float> b; return 0;}\n")
- try_compile(GOOGLEHASH_COMPILE ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/googlehash_test.cpp OUTPUT_VARIABLE GOOGLEHASH_COMPILE_RESULT)
+ cmake_push_check_state()
+ set(CMAKE_REQUIRED_FLAGS)
+ set(CMAKE_REQUIRED_DEFINITIONS)
+ set(CMAKE_REQUIRED_INCLUDES ${GOOGLEHASH_INCLUDES})
+ set(CMAKE_REQUIRED_LIBRARIES)
+ check_cxx_source_compiles("#include <google/sparse_hash_map>\n#include <google/dense_hash_map>\nint main(int argc, char** argv) { google::dense_hash_map<int,float> a; google::sparse_hash_map<int,float> b; return 0;}\n" GOOGLEHASH_COMPILE)
+ cmake_pop_check_state()
endif(GOOGLEHASH_INCLUDES)
include(FindPackageHandleStandardArgs)