-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
39 lines (29 loc) · 1.04 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
cmake_minimum_required(VERSION 3.15)
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")
include(build_submodule)
# Build external libraries
# TODO: conditional on enable testing!
build_submodule(extern/pFUnit PROJECT PFUNIT TARGET PFUNIT)
# TODO: find packages
# https://cliutils.gitlab.io/modern-cmake/chapters/testing.html
#enable_testing() # conditionally!
find_package(PFUNIT REQUIRED)
enable_testing()
# TODO: doxygen additions
add_subdirectory(src)
add_subdirectory(test)
# TODO: cmake config file to allow find_package