forked from halbux/sparselizard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (33 loc) · 1.19 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
project(Sparselizard LANGUAGES CXX VERSION 0.1)
set(DEFAULT_BUILD_TYPE "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as none was specified.")
set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif()
# Append to debug version
set(CMAKE_DEBUG_POSTFIX "_debug")
# Installation definitions
include(GNUInstallDirs)
# Aux functions
include(cMake/functions.cmake)
include(cMake/SetupBLAS.cmake)
include(cMake/SetupGMSH.cmake)
include(cMake/SetupMETIS.cmake)
include(cMake/SetupMPI.cmake)
include(cMake/SetupMUMPS.cmake)
include(cMake/SetupPETSC.cmake)
include(cMake/SetupSLEPC.cmake)
# add libsparselizard target
add_subdirectory(src)
# choose what to build
option(BUILD_EXAMPLES "Build examples instead of simulation." OFF)
if(BUILD_EXAMPLES)
# add examples targets
add_subdirectory(examples)
else(BUILD_EXAMPLES)
# add simulations targets
add_subdirectory(simulations)
endif(BUILD_EXAMPLES)