inmost-config.cmake.in 3.96 KB
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1
2
3
4
5
6
# - Config file for the INMOST package
# It defines the following variables
#  INMOST_INCLUDE_DIRS  - include directories for INMOST and dependencies
#  INMOST_LIBRARY_DIRS  - library directories for INMOST and dependencies
#  INMOST_LIBRARIES     - libraries to link against
#  INMOST_COMPILE_FLAGS - flags to set to compiler (generally inherited from MPI)
Kirill Terekhov's avatar
Updates    
Kirill Terekhov committed
7
#  INMOST_LINK_FLAGS - flags to set to linker (generally inherited from MPI)
Kirill Terekhov's avatar
Kirill Terekhov committed
8
9
 
# Compute paths
Kirill Terekhov's avatar
Kirill Terekhov committed
10
get_filename_component(inmost_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
Kirill Terekhov's avatar
Kirill Terekhov committed
11
12
13
set(INMOST_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@")
 
if(NOT TARGET inmost AND NOT INMOST_BINARY_DIR)
Kirill Terekhov's avatar
Kirill Terekhov committed
14
15
16
17
18
  if( EXISTS "${inmost_DIR}/cmake/inmost-targets.cmake" )
    include("${inmost_DIR}/cmake/inmost-targets.cmake")
  elseif( EXISTS "${inmost_DIR}/inmost-targets.cmake" )
    include("${inmost_DIR}/inmost-targets.cmake")
  elseif( EXISTS "${inmost_DIR}/CMakeFiles/Exports/cmake/inmost-targets.cmake")
Kirill Terekhov's avatar
Kirill Terekhov committed
19
    include("${inmost_DIR}/CMakeFiles/Exports/cmake/inmost-targets.cmake")
Kirill Terekhov's avatar
Kirill Terekhov committed
20
  endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
21
22
endif()
 
Kirill Terekhov's avatar
Fixes    
Kirill Terekhov committed
23
set(INMOST_LIBRARY_DIRS "${inmost_DIR}")
24
list(APPEND INMOST_LIBRARY_DIRS "@CONF_LIBRARY_DIRS@")
Kirill Terekhov's avatar
Kirill Terekhov committed
25
26
27
set(INMOST_LIBRARIES inmost)


Kirill Terekhov's avatar
Kirill Terekhov committed
28
set(USE_MPI @USE_MPI@)
Kirill Terekhov's avatar
Kirill Terekhov committed
29
set(USE_OMP @USE_OMP@)
Kirill Terekhov's avatar
Kirill Terekhov committed
30
31
set(USE_PARTITIONER_ZOLTAN @USE_PARTITIONER_ZOLTAN@)
set(USE_PARTITIONER_PARMETIS @USE_PARTITIONER_PARMETIS@)
32
set(USE_PARTITIONER_METIS @USE_PARTITIONER_METIS@)
Kirill Terekhov's avatar
Kirill Terekhov committed
33
34
set(USE_SOLVER_MONDRIAAN @USE_SOLVER_MONDRIAAN@)
set(USE_SOLVER_METIS @USE_SOLVER_METIS@)
Kirill Terekhov's avatar
Kirill Terekhov committed
35
36
set(USE_SOLVER_TRILINOS @USE_SOLVER_TRILINOS@)
set(USE_SOLVER_PETSC @USE_SOLVER_PETSC@)
Kirill Terekhov's avatar
Kirill Terekhov committed
37
set(USE_SOLVER_SUPERLU @USE_SOLVER_SUPERLU@)
38
set(USE_MT @USE_MT@)
Dmitry Bagaev's avatar
Dmitry Bagaev committed
39
40
set(USE_OPTIMIZER @USE_OPTIMIZER@)
set(USE_OPTIMIZER_BAYESIAN @USE_OPTIMIZER_BAYESIAN@)
Kirill Terekhov's avatar
Kirill Terekhov committed
41

42
if( USE_OMP )
43
44
        set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} @OpenMP_C_FLAGS@")
        set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} @OpenMP_CXX_FLAGS@")
45
46
endif( USE_OMP )

Kirill Terekhov's avatar
Kirill Terekhov committed
47
48
49
if( USE_MPI )
	list(APPEND INMOST_INCLUDE_DIRS "@MPI_INCLUDE_PATH@")
	list(APPEND INMOST_COMPILE_FLAGS "@MPI_COMPILE_FLAGS@")
Kirill Terekhov's avatar
Updates    
Kirill Terekhov committed
50
51
	list(APPEND INMOST_LIBRARIES "@MPI_LIBRARIES@")
	list(APPEND INMOST_LINK_FLAGS "@MPI_LINK_FLAGS@")
Kirill Terekhov's avatar
Kirill Terekhov committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
endif( USE_MPI )

if( USE_PARTITIONER_ZOLTAN )
	list(APPEND INMOST_LIBRARIES "@ZOLTAN_LIBRARIES@")
	list(APPEND INMOST_INCLUDE_DIRS "@ZOLTAN_INCLUDE_DIRS@")
endif( USE_PARTITIONER_ZOLTAN )


if( USE_PARTITIONER_PARMETIS )
	list(APPEND INMOST_LIBRARIES "@PARMETIS_LIBRARIES@")
	list(APPEND INMOST_INCLUDE_DIRS "@PARMETIS_INCLUDE_DIR@")
	list(APPEND INMOST_INCLUDE_DIRS "@METIS_INCLUDE_DIR@")
endif( USE_PARTITIONER_PARMETIS )

Kirill Terekhov's avatar
Kirill Terekhov committed
66
67
68
69
70
71
if( USE_SOLVER_MONDRIAAN )
	list(APPEND INMOST_LIBRARIES "@MONDRIAAN_LIBRARIES@")
	list(APPEND INMOST_INCLUDE_DIRS "@MONDRIAAN_INCLUDE_DIRS@")
	list(APPEND INMOST_LIBRARY_DIRS "@MONDRIAAN_LIBRARY_DIRS@")
endif( USE_SOLVER_MONDRIAAN )

72
if( USE_SOLVER_METIS OR USE_PARTITIONER_METIS)
Kirill Terekhov's avatar
Kirill Terekhov committed
73
74
	list(APPEND INMOST_LIBRARIES "@METIS_LIBRARIES@")
	list(APPEND INMOST_INCLUDE_DIRS "@METIS_INCLUDE_DIR@")
75
endif( USE_SOLVER_METIS OR USE_PARTITIONER_METIS )
Kirill Terekhov's avatar
Kirill Terekhov committed
76
77
78
79
80
81
82
83

if( USE_SOLVER_TRILINOS )
	list(APPEND INMOST_LIBRARIES "@Trilinos_LIBRARIES@")
	list(APPEND INMOST_LIBRARIES "@Trilinos_TPL_LIBRARIES@")
	list(APPEND INMOST_LIBRARY_DIRS "@Trilinos_LIBRARY_DIRS@")
	list(APPEND INMOST_LIBRARY_DIRS "@Trilinos_TPL_LIBRARY_DIRS@")
	list(APPEND INMOST_INCLUDE_DIRS "@Trilinos_INCLUDE_DIRS@")
	list(APPEND INMOST_INCLUDE_DIRS "@Trilinos_TPL_INCLUDE_DIRS@")
Kirill Terekhov's avatar
Kirill Terekhov committed
84
85
86
87
88
	if(MSVC)
      message("Putting workaround for Visual Studio that allow to use Trilinos Release libraries in Debug mode")
      message("Note that this workaround may affect your debugging experience, you may want to debug without Trilinos")
      list(APPEND INMOST_DEFINITIONS "-D_ITERATOR_DEBUG_LEVEL=0")
    endif(MSVC)
Kirill Terekhov's avatar
Kirill Terekhov committed
89
90
endif( USE_SOLVER_TRILINOS )

Kirill Terekhov's avatar
Kirill Terekhov committed
91
if( USE_SOLVER_SUPERLU )
Kirill Terekhov's avatar
Kirill Terekhov committed
92
93
	list(APPEND INMOST_LIBRARIES "@SUPERLU_LIBRARIES@")
	list(APPEND INMOST_INCLUDE_DIRS "@SUPERLU_INCLUDES@")
Kirill Terekhov's avatar
Kirill Terekhov committed
94
95
endif( USE_SOLVER_SUPERLU )

Kirill Terekhov's avatar
Kirill Terekhov committed
96
97
98
99
100

if( USE_SOLVER_PETSC )
	list(APPEND INMOST_LIBRARIES "@PETSC_LIBRARIES@")
	list(APPEND INMOST_LIBRARY_DIRS "@PETSC_LIBRARY_DIRS@")
	list(APPEND INMOST_INCLUDE_DIRS "@PETSC_INCLUDES@")
Kirill Terekhov's avatar
Updates    
Kirill Terekhov committed
101
endif( USE_SOLVER_PETSC )