We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake_minimum_required(VERSION 3.10) project(MetalTranslate) include(ExternalProject) set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/external) # CTranslate2 External Project ExternalProject_Add(CTranslate2 GIT_REPOSITORY https://github.com/OpenNMT/CTranslate2 GIT_TAG 4908b9d CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION} -DWITH_MKL=OFF -DWITH_DNNL=ON ) # Tokenizer External Project ExternalProject_Add(Tokenizer GIT_REPOSITORY https://github.com/OpenNMT/Tokenizer GIT_TAG 559b8e7 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION} ) # Include directories for CTranslate2 and Tokenizer include_directories(${EXTERNAL_INSTALL_LOCATION}/include) link_directories(${EXTERNAL_INSTALL_LOCATION}/lib) # Ensure CTranslate2 and Tokenizer are built before metaltranslate add_executable(metaltranslate src/main.cpp) # Add the MetalTranslate sources set(TARGET_H src/MetalTranslate.h src/MetalTranslateConfig.h) target_sources(metaltranslate PRIVATE src/MetalTranslate.cpp) # Link the external libraries add_dependencies(metaltranslate CTranslate2 Tokenizer) target_link_libraries(metaltranslate ${EXTERNAL_INSTALL_LOCATION}/lib/libctranslate2.so) target_link_libraries(metaltranslate ${EXTERNAL_INSTALL_LOCATION}/lib/libOpenNMTTokenizer.so)
Please revise CMakelists.txt like this. It was not works previous version on my machine
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Please revise CMakelists.txt like this.
It was not works previous version on my machine
The text was updated successfully, but these errors were encountered: