You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
909 B

  1. if (GOOGLEHASH_INCLUDES AND GOOGLEHASH_LIBRARIES)
  2. set(GOOGLEHASH_FIND_QUIETLY TRUE)
  3. endif (GOOGLEHASH_INCLUDES AND GOOGLEHASH_LIBRARIES)
  4. find_path(GOOGLEHASH_INCLUDES
  5. NAMES
  6. google/dense_hash_map
  7. PATHS
  8. ${INCLUDE_INSTALL_DIR}
  9. )
  10. if(GOOGLEHASH_INCLUDES)
  11. # let's make sure it compiles with the current compiler
  12. file(WRITE ${CMAKE_BINARY_DIR}/googlehash_test.cpp
  13. "#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")
  14. try_compile(GOOGLEHASH_COMPILE ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/googlehash_test.cpp OUTPUT_VARIABLE GOOGLEHASH_COMPILE_RESULT)
  15. endif(GOOGLEHASH_INCLUDES)
  16. include(FindPackageHandleStandardArgs)
  17. find_package_handle_standard_args(GOOGLEHASH DEFAULT_MSG GOOGLEHASH_INCLUDES GOOGLEHASH_COMPILE)
  18. mark_as_advanced(GOOGLEHASH_INCLUDES)