You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cmake uses the appropriate compiler based on the extension of teh file. i.e .cpp files will use g++ while .cu files will use nvcc.
Visual studio with cuda enabled will pass all files through nvcc.
This means that including cuda related headers in a .cpp file will work under windows but not linux.
I.e.
In file included from /home/ptheywood/code/flamegpu/flamegpu2_dev/include/flamegpu/runtime/flame_functions_api.h:14:0,
from /home/ptheywood/code/flamegpu/flamegpu2_dev/include/flamegpu/model/AgentFunctionDescription.h:22,
from /home/ptheywood/code/flamegpu/flamegpu2_dev/include/flamegpu/model/AgentDescription.h:22,
from /home/ptheywood/code/flamegpu/flamegpu2_dev/include/flamegpu/model/ModelDescription.h:22,
from /home/ptheywood/code/flamegpu/flamegpu2_dev/include/flamegpu/io/statereader.h:15,
from /home/ptheywood/code/flamegpu/flamegpu2_dev/include/flamegpu/io/xmlReader.h:14,
from /home/ptheywood/code/flamegpu/flamegpu2_dev/src/flamegpu/io/xmlReader.cpp:16:
/home/ptheywood/code/flamegpu/flamegpu2_dev/include/flamegpu/gpu/CUDAErrorChecking.h:16:26: fatal error: cuda_runtime.h: No such file or directory
The file xmlReader.cpp is compiled by g++, but tthrough the inclusion chain it attempts to include cuda_runtime.h which is not available.
Using the appropriate naming convention should help us to not include cuda files in cpp files.
The text was updated successfully, but these errors were encountered:
Renaming flame_functions_api.h to flame_functions_api.cuh would let cmake correctly handle it as a cuda file and use nvcc rather than a host c compiler, with appropriate flags to actually find cuda_runtime.h
Cmake uses the appropriate compiler based on the extension of teh file. i.e
.cpp
files will useg++
while.cu
files will usenvcc
.Visual studio with cuda enabled will pass all files through
nvcc
.This means that including cuda related headers in a
.cpp
file will work under windows but not linux.I.e.
The file
xmlReader.cpp
is compiled by g++, but tthrough the inclusion chain it attempts to includecuda_runtime.h
which is not available.Using the appropriate naming convention should help us to not include cuda files in cpp files.
The text was updated successfully, but these errors were encountered: