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