-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathpapilo-config.cmake.in
85 lines (74 loc) · 2.75 KB
/
papilo-config.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
if(NOT TARGET papilo)
include(${CMAKE_CURRENT_LIST_DIR}/papilo-targets.cmake)
endif()
set(PAPILO_IMPORTED_TARGETS papilo)
set(PAPILO_FOUND 1)
# For `find_dependency` function.
include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH @EXTRA_CMAKE_MODULE_PATH@)
# If PAPILO was built with Quadmath then we also need it.
set(PAPILO_HAVE_FLOAT128 @PAPILO_HAVE_FLOAT128@)
if(PAPILO_HAVE_FLOAT128)
if(NOT Quadmath_FOUND)
find_dependency(Quadmath)
endif()
endif()
# If PAPILO was built with GMP then we also need it.
set(PAPILO_HAVE_GMP @PAPILO_HAVE_GMP@)
if(PAPILO_HAVE_GMP AND PAPILO_FOUND)
if(NOT GMP_FOUND)
if(NOT GMP_DIR)
set(GMP_DIR @GMP_DIR@)
endif()
find_dependency(GMP)
endif()
endif()
# If PAPILO was built with TBB then we also need it.
set(PAPILO_TBB @PAPILO_TBB@)
if(PAPILO_TBB AND PAPILO_FOUND)
if(NOT TBB_FOUND)
if(NOT TBB_DIR)
set(TBB_DIR @TBB_DIR@)
endif()
find_dependency(TBB 2018 COMPONENTS tbb tbbmalloc HINTS ${CMAKE_CURRENT_LIST_DIR}/_deps/local/ ${CMAKE_CURRENT_LIST_DIR}/_deps/local/lib)
endif()
endif()
# If PAPILO uses the standard hashmap then we also do.
set(PAPILO_USE_STANDARD_HASHMAP @PAPILO_USE_STANDARD_HASHMAP@)
# If PAPILO was built with iostreams / program_options / serialization then we also need it.
set(PAPILO_HAVE_BOOST_IOSTREAMS @PAPILO_HAVE_BOOST_IOSTREAMS@)
set(PAPILO_USE_BOOST_IOSTREAMS_WITH_ZLIB @PAPILO_USE_BOOST_IOSTREAMS_WITH_ZLIB@)
set(PAPILO_USE_BOOST_IOSTREAMS_WITH_BZIP2 @PAPILO_USE_BOOST_IOSTREAMS_WITH_BZIP2@)
set(PAPILO_COMMAND_LINE_AVAILABLE @PAPILO_COMMAND_LINE_AVAILABLE@)
set(PAPILO_SERIALIZATION_AVAILABLE @PAPILO_SERIALIZATION_AVAILABLE@)
set(BOOST_COMPONENTS)
if(PAPILO_HAVE_BOOST_IOSTREAMS)
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} iostreams)
endif()
if(PAPILO_COMMAND_LINE_AVAILABLE)
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} program_options)
endif()
if(PAPILO_SERIALIZATION_AVAILABLE)
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} serialization)
endif()
if(BOOST_COMPONENTS AND PAPILO_FOUND)
if((NOT Boost_PROGRAM_OPTIONS_FOUND AND PAPILO_COMMAND_LINE_AVAILABLE) OR (NOT Boost_SERIALIZATION_FOUND AND PAPILO_SERIALIZATION_AVAILABLE) OR (NOT Boost_IOSTREAMS_FOUND AND PAPILO_HAVE_BOOST_IOSTREAMS))
if(NOT BOOST_ROOT)
set(BOOST_ROOT @BOOST_ROOT@)
endif()
find_dependency(Boost @BOOST_MIN_VERSION@ COMPONENTS ${BOOST_COMPONENTS})
endif()
endif()
# We also need Threads.
if(PAPILO_FOUND)
if(NOT Threads_FOUND)
find_dependency(Threads)
endif()
endif()
if(@PAPILO_HAVE_LUSOL@ AND PAPILO_FOUND)
enable_language(Fortran)
endif()
if(PAPILO_FOUND)
find_package_message(PAPILO "Found PAPILO: ${CMAKE_CURRENT_LIST_FILE} (found suitable version \"@papilo_VERSION@\")"
"[${PAPILO_FOUND}][${TBB_FOUND}]")
endif()