-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
45 lines (34 loc) · 1.2 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
cmake_minimum_required(VERSION 3.15)
option(PFUNIT "ON - using pFUnit for unit tests, OFF - skip building unit tests" ON)
option(TEST_DRIVE "ON - Using test-drive for unittests, OFF - skip building unit tests" OFF)
project(
TestSPBLAS
VERSION 0.1.0
LANGUAGES Fortran
)
# Set paths to Intel oneAPI MKL
set(MKLROOT $ENV{MKLROOT}) # Assuming MKLROOT is already set in the environment
if (NOT MKLROOT)
message(FATAL_ERROR "MKLROOT environment variable is not set.")
endif()
# These can be changed with -D... flag during build config
set(MKLLIB ${MKLROOT}/lib CACHE PATH "Path to Intel MKL Libraries")
set(MKLINCLUDE ${MKLROOT}/include CACHE PATH "Path to Intel MKL include files")
# Get cmake functions
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
if (${TEST_DRIVE} OR ${PFUNIT})
include(CTest)
enable_testing()
endif()
find_package(Doxygen)
if(Doxygen_FOUND)
message(STATUS "Building doxygen documentation")
add_subdirectory(doc)
else()
message(STATUS "Doxygen not found, not building docs")
endif()
# Build external libraries
add_subdirectory(extern)
add_subdirectory(src)
add_subdirectory(test)
# TODO: cmake config file to allow find_package