Hello everybody!
I wanted to write a couple of custom CHOPs and I found a lot of useful online material that helped me understand the API, and I think that the CustomOperator repo is a great resource.
The only thing was that I couldn’t build the examples because I am working on a Mac and the repository only contains Visual Studio solutions. Moreover I wanted to use an external library in one of my custom CHOPs, and I could really easily integrate my library using CMake.
Suddenly I found this repo which uses CMake as a build system and I managed to compile my projects on my machine!
I just wanted to share with you my a fork of the CustomOperator repository into which I added the possibility to use CMake to build the examples provided by Derivative:
https://github.com/ddgg-el/CustomOperatorSamples
This fork is just a proof of concept and I am sure that it can be optimized or even simplified. So far I just worked on the CHOPs and on those TOPs which are not Cuda dependent (since they are the only ones that I could test), but I am planning to commit the DAT and the SOP folder soon.
To compile an Operator, let’s say the BasicFilterCHOP
you can just:
% cd BasiFilterCHOP
% mkdir build && cd build
choose the Generator of your choice (Unix Makefiles
, Xcode
etc…) and build the project:
% cmake -G"Unix Makefiles" ..
% cmake --build .
this commands will produce a plugin
folder inside the BasicFilterCHOP
whre you can find your custom plugin.
I don’t know if this was already possible. I hope that it can be useful for someone