Hi everybody,
i wrote some code using the libtorch library. For this I used the debug version of libtorch. I linked it with cmake as decribed on the tutorial page ‘using the c++ frontend’. Now, I want to bring my code to release version. How do I link both the debug and the release version of the library via CMake so that the correct library is used for the particular purpose? As we set the CMAKE_PREFIX_PATH where the library is saved, there may be an opportunity to set one or two CMake variables to the two different library paths with kind of a flag wich one should be used for debugging or release mode. Do you have any suggestions?
I found this thread on a popular website but I don’t know how to deal with this problem according to libtorch, because there is only one variable TORCH in the config files.

  
      stackoverflow.com
  
  
      
    
  

  Linking different libraries for Debug and Release builds in Cmake on windows? 71



  c++, windows, cmake



  asked by
  
  
    gct
  
  on 07:47PM - 05 Feb 10 UTC