Ok I was able to fix it by myself by changing SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) to
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
With this change I was able to create the make file with cmake.
But now as soon i try to build the source file with the “make” command I get the following compiler errors:

  
      gist.github.com
  
  
    https://gist.github.com/shyney7/ca3e59186c2904024ab037df11213e57 8
Libtorch_compiler_error_QNX
marcel@ubuntu:~/Documents/libtorch_cross_test/build$ make
Scanning dependencies of target example-app
[ 50%] Building CXX object CMakeFiles/example-app.dir/main.cpp.o
In file included from /home/marcel/qnx700/target/qnx7/usr/include/c++/v1/algorithm:628:0,
                 from /home/marcel/qnx700/target/qnx7/usr/include/c++/v1/string:439,
                 from /home/marcel/qnx700/target/qnx7/usr/include/c++/v1/__locale:15,
                 from /home/marcel/qnx700/target/qnx7/usr/include/c++/v1/ios:216,
                 from /home/marcel/qnx700/target/qnx7/usr/include/c++/v1/iostream:38,
                 from /home/marcel/Documents/libtorch_cross_test/main.cpp:1:
/home/marcel/qnx700/target/qnx7/usr/include/c++/v1/memory: In instantiation of 'struct std::__1::allocator_traits<std::__1::allocator_traits<std::__1::allocator<std::__1::pair<c10::IValue, c10::IValue> > >::rebind_alloc<ska_ordered::detailv3::sherwood_v3_entry<std::__1::pair<c10::IValue, c10::IValue> > > >':
This file has been truncated. show original