Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

CMakeLists.txt 454 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  1. cmake_minimum_required(VERSION 3.10)
  2. project(run_model)
  3. option(USE_TORCHVISION "Whether to link to torchvision" OFF)
  4. find_package(Torch REQUIRED)
  5. if(USE_TORCHVISION)
  6. find_package(TorchVision REQUIRED)
  7. endif()
  8. add_executable(run_model run_model.cpp)
  9. target_link_libraries(run_model "${TORCH_LIBRARIES}")
  10. if(USE_TORCHVISION)
  11. target_link_libraries(run_model TorchVision::TorchVision)
  12. endif()
  13. set_property(TARGET run_model PROPERTY CXX_STANDARD 17)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...