-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (24 loc) · 1.22 KB
/
CMakeLists.txt
File metadata and controls
32 lines (24 loc) · 1.22 KB
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
CMAKE_MINIMUM_REQUIRED (VERSION 3.3)
PROJECT (sac-cudamodule)
#FIXME(artem) we can create a definitoin for language "SAC" which will
# automatically pull sac2c compiler.
# Where the compiled sac modules result
SET (DLL_BUILD_DIR "${PROJECT_BINARY_DIR}/lib")
# For what targets we build modules
SET (TARGETS cuda CACHE STRING "Build stdlib-cuda for these targets")
SET (SAC2C_EXEC CACHE STRING "A path to sac2c compiler")
SET (LINKSETSIZE "0" CACHE STRING "Set a value for -linksetsize parameter of sac2c")
SET (ENABLE_CUDA_CHECK OFF CACHE STRING "Activate CUDA runtime checks")
# Check whether sac2c is operational
INCLUDE ("cmake-common/check-sac2c.cmake")
INCLUDE ("cmake-common/misc-macros.cmake")
# Ensure CUDA is available
FIND_PACKAGE (CUDA REQUIRED)
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/config.h.in"
"${PROJECT_BINARY_DIR}/include/config.h")
# For every target run CMakeLists.txt in src
FOREACH (TARGET IN ITEMS ${TARGETS})
ADD_SUBDIRECTORY (src src-${TARGET})
ENDFOREACH ()
# This build target is responsible for generating the package sac2crc file
CREATE_SAC2CRC_TARGET ("cudamodule" "${DLL_BUILD_DIR}" "${DLL_BUILD_DIR}")