Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 962ecc10 authored by hhakim's avatar hhakim
Browse files

Remove from CMake script the cuda version 9.2 if windows (forgotten in...

Remove from CMake script the cuda version 9.2 if windows (forgotten in e8e7fd3f).
parent 55bcfa69
Branches
Tags
No related merge requests found
...@@ -708,14 +708,21 @@ endif() ...@@ -708,14 +708,21 @@ endif()
if(USE_GPU_MOD) if(USE_GPU_MOD)
# TODO: test existence of build-cu9.2 # TODO: it must be a cmake variable # TODO: test existence of build-cu9.2 # TODO: it must be a cmake variable
# the headers for gpu_mod are the same for any version of cuda # the headers for gpu_mod are the same for any version of cuda
include_directories(${FAUST_TARGET} ${GPU_MOD_INCLUDE_DIR} ${GPU_MOD_INCLUDE_DIR}/../build-cu9.2) include_directories(${FAUST_TARGET} ${GPU_MOD_INCLUDE_DIR} ${GPU_MOD_INCLUDE_DIR}/../build-cu11.4)
include_directories(${FAUST_TARGET} ${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR}) include_directories(${FAUST_TARGET} ${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR})
target_include_directories(${FAUST_TARGET} PUBLIC ${GPU_MOD_INCLUDE_DIR} ${GPU_MOD_INCLUDE_DIR}/../build-cu9.2) target_include_directories(${FAUST_TARGET} PUBLIC ${GPU_MOD_INCLUDE_DIR} ${GPU_MOD_INCLUDE_DIR}/../build-cu11.4)
target_link_libraries(${FAUST_TARGET} ${GPU_MOD_LIBS}) target_link_libraries(${FAUST_TARGET} ${GPU_MOD_LIBS})
if(UNIX) if(UNIX)
target_link_libraries(${FAUST_TARGET} dl) target_link_libraries(${FAUST_TARGET} dl)
endif(UNIX) endif(UNIX)
foreach(CUDA_CONF IN ITEMS cu9.2 cu11.4) # TODO: used versions of CUDA and include dir should be CMake variables
if(WIN32)
# do not support CUDA 9.2 on Windows (require too old version VS <= 2017)
set(CUDA_VERSIONS cu11.4)
else()
set(CUDA_VERSIONS cu9.2;cu11.4)
endif()
foreach(CUDA_CONF IN LISTS CUDA_VERSIONS)
string(REGEX REPLACE "\\." "-${CUDA_CONF}." GPU_MOD_LIB_CUDA_CONF ${GPU_MOD_LIB}) string(REGEX REPLACE "\\." "-${CUDA_CONF}." GPU_MOD_LIB_CUDA_CONF ${GPU_MOD_LIB})
file(COPY ${GPU_MOD_INCLUDE_DIR}/../build-${CUDA_CONF}/${GPU_MOD_LIB} DESTINATION ${PROJECT_BINARY_DIR}) file(COPY ${GPU_MOD_INCLUDE_DIR}/../build-${CUDA_CONF}/${GPU_MOD_LIB} DESTINATION ${PROJECT_BINARY_DIR})
file(RENAME ${PROJECT_BINARY_DIR}/${GPU_MOD_LIB} ${GPU_MOD_INCLUDE_DIR}/../build-${CUDA_CONF}/${GPU_MOD_LIB_CUDA_CONF}) file(RENAME ${PROJECT_BINARY_DIR}/${GPU_MOD_LIB} ${GPU_MOD_INCLUDE_DIR}/../build-${CUDA_CONF}/${GPU_MOD_LIB_CUDA_CONF})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment