-
Notifications
You must be signed in to change notification settings - Fork 29
/
CMakeLists.txt
60 lines (45 loc) · 1.22 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
project(CSPLATT)
cmake_minimum_required(VERSION 2.8.0)
include(cmake/version.cmake)
# Libraries to link against -- will concatenate to this
set(SPLATT_LIBS splatt m)
# Intel customization
if(DEFINED INTEL_OPT)
set(INTEL_OPT true)
# GCC/Clang
else()
set(INTEL_OPT false)
endif()
# OS-specific stuff
include(cmake/system.cmake)
# Configuration
include(cmake/types.cmake)
include(cmake/constants.cmake)
include(cmake/debug.cmake)
include(cmake/flags.cmake)
# Libraries
include(cmake/lapack.cmake)
include(cmake/openmp.cmake)
include(cmake/mpi.cmake)
include(cmake/partition.cmake)
include(cmake/fortran.cmake)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
add_subdirectory(include)
# Source code files to compile for library
file(GLOB SPLATT_SOURCES
src/*.c
src/ccp/*.c
${MPI_SOURCES})
# Generate splatt library
add_subdirectory(lib)
# Compile applications
add_subdirectory(src)
# Unit tests
add_subdirectory(tests)
# uninstall
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)