Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9efc183e authored by hhakim's avatar hhakim
Browse files

Update cmake script to link torch libs to faust_torch test automatically.

parent 7528836a
No related branches found
No related tags found
No related merge requests found
......@@ -239,13 +239,17 @@ if(MATIO_LIB_FILE AND MATIO_INC_DIR AND BUILD_READ_MAT_FILE AND NOT NOCPPTESTS)
# Generation of the binary files in double and float precision
add_executable(${TEST_CPP_NAME} ${FAUST_BIN_TEST_SRC_DIR}/${TEST_FILE_CPP} ${FAUST_BIN_TEST_SRC_DIR}/ ${FAUST_CMDLINE_TYPE_FORMAT_MAT_SRC_DIR}/faust_init_from_matio.cpp ${FAUST_CMDLINE_TYPE_FORMAT_MAT_SRC_DIR}/faust_init_from_matio_mat.cpp)
target_link_libraries(${TEST_CPP_NAME} ${FAUST_TARGET} ${MATIO_LIB_FILE} ${HDF5_LIB_FILE})
set(TEST_LIBS ${FAUST_TARGET};${MATIO_LIB_FILE};${HDF5_LIB_FILE})
if(FAUST_TORCH)
list(APPEND TEST_LIBS ${TORCH_LIBRARY};${Torch_DIR}/../../../lib/libc10.so)
endif()
target_link_libraries(${TEST_CPP_NAME} ${TEST_LIBS})
if(USE_GPU_MOD)
target_compile_options(${TEST_CPP_NAME} PRIVATE "${OMP_CXX_FLAGS}")
target_link_options(${TEST_CPP_NAME} PRIVATE "-fopenmp") # might work only for linux
endif()
endforeach()
endforeach()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment