FLAMEGPU / FLAMEGPU2-model-template-cpp

Template for creating standalone FLAMEGPU2 models using the C++ (CUDA) interface
MIT License
4 stars 2 forks source link

Add support for FLAMEGPU_ROOT CMake var #8

Closed Robadob closed 2 years ago

Robadob commented 2 years ago

This is the version I've tested in Primage repo.

I've tested that it works when enabled, not tested that somehow I've broken when it's disabled.

Closes #7

Robadob commented 2 years ago

SQUASH ME ON MERGE

Robadob commented 2 years ago

I presume it's failing silently, then falling back to old behaviour. The VISUALISATION_ROOT behaviour in fgpu repo probably the same.

ptheywood commented 2 years ago

I presume it's failing silently, then falling back to old behaviour. The VISUALISATION_ROOT behaviour in fgpu repo probably the same.

find_path(FLAMEGPU_ROOT_ABS ... is finding my local copy even though it is not within the hinted or path subdirectories. Might need to pass some other options to find_path so it doesn't find it when it shouldn't. I'll try and fix it.

ptheywood commented 2 years ago

Ah find_path caches the path when it finds one unless NO_CACHE is passed, so it was remembering the location I told it about earlier. Will push a fix when I've tidied it up.

Also, attempting to overide FLAMEGPU_VERSION from the command line (as suggested in the readme) doesn't work if it is set in the CMAkeLists.txt (as a non cache variable).

Setting it as a cache variable however, means that if the CMakeLists.txt is changed, it will not change the value used (I.e. recent ensemble benchmarking issue, which does set it as a cache variable not a local). I am not certain what the best setup for this is.