As mentioned in the title, the CPU code of my optix program needs to be accelerated for some host programs using OpenMP. I attempted to add the option -Xcompiler -fopenmp to the OPTIONS in the CMakefile. However, it did not work. The compiler still warned that it did not recognize the OpenMP precompiled directives. As shown below
warning: ignoring ‘#pragma omp parallel’ [-Wunknown-pragmas]
597 | #pragma omp parallel for reduction(max:max_label)
I am using the default CMkae file provided in the SDK. I’m sorry, I’m not very familiar with CMake. Could someone offer me some assistance on how to make the OptiX program support OpenMP?Perhaps the .o file can be compiled separately using g++ (with the -fopenmp option), and then linked (but I’m not sure how to proceed with the default CMake file)