-
Notifications
You must be signed in to change notification settings - Fork 4
/
hbrs-mpl-config.cmake.in
69 lines (60 loc) · 2.44 KB
/
hbrs-mpl-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
# Copyright (c) 2018-2019 Jakob Meng, <[email protected]>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
@PACKAGE_INIT@
set (hbrs-mpl_BINDIR "@PACKAGE_HBRS_MPL_INSTALL_BINDIR@")
set_and_check(hbrs-mpl_LIBDIR "@PACKAGE_HBRS_MPL_INSTALL_LIBDIR@")
set_and_check(hbrs-mpl_INCLUDEDIR "@PACKAGE_HBRS_MPL_INSTALL_INCLUDEDIR@")
set_and_check(hbrs-mpl_CMAKEDIR "@PACKAGE_HBRS_MPL_INSTALL_CMAKEDIR@")
set(hbrs-mpl_elemental_FOUND @HBRS_MPL_ENABLE_ELEMENTAL@)
set(hbrs-mpl_matlab_FOUND @HBRS_MPL_ENABLE_MATLAB@)
check_required_components(hbrs-mpl)
# NOTE: Keep list of dependencies in sync with packages in CMakeLists.txt!
include(CMakeFindDependencyMacro)
# NOTE: hbrs-cmake is only used during build
#if(@hbrs-cmake_FOUND@)
# find_dependency(hbrs-cmake REQUIRED)
#endif()
if(@Boost_FOUND@)
find_dependency(Boost 1.62 REQUIRED COMPONENTS unit_test_framework system thread serialization chrono program_options filesystem iostreams regex exception log)
endif()
if (@HBRS_MPL_ENABLE_MATLAB@)
if(@LAPACK_FOUND@)
find_dependency(LAPACK)
endif()
if(@LAPACKE_FOUND@)
find_dependency(LAPACKE)
endif()
if(@Matlab_FOUND@)
find_dependency(Matlab COMPONENTS MAIN_PROGRAM)
endif()
endif()
if(@OpenMP_FOUND@)
find_dependency(OpenMP)
endif()
if(@MPI_FOUND@)
find_dependency(MPI)
endif()
if (@HBRS_MPL_ENABLE_ELEMENTAL@)
if(@Elemental_FOUND@)
find_dependency(Elemental)
endif()
endif()
# NOTE: VALGRIND is only used during build
#if(@VALGRIND_FOUND@)
# find_dependency(VALGRIND)
#endif()
set(hbrs-mpl_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@")
set(hbrs-mpl_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@")
if((NOT hbrs-mpl_CXX_COMPILER_ID STREQUAL CMAKE_CXX_COMPILER_ID) OR
(NOT hbrs-mpl_CXX_COMPILER_VERSION STREQUAL CMAKE_CXX_COMPILER_VERSION))
message(WARNING
"This code was built with C++ compiler ${hbrs-mpl_CXX_COMPILER_ID} ${hbrs-mpl_CXX_COMPILER_VERSION}, "
"but you're using ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}. "
"This might cause linking problems or hardly traceable errors at runtime due to binary incompatibilities! "
"Better use the same compiler and same compiler version. For details see "
"https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C++")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/hbrs-mpl-targets.cmake")