FLAMEGPU / FLAMEGPU2

FLAME GPU 2 is a GPU accelerated agent based modelling framework for CUDA C++ and Python
https://flamegpu.com
MIT License
106 stars 22 forks source link

CMake: Fix source_group use when fetched via CMake Fetch Content #1113

Closed ptheywood closed 1 year ago

ptheywood commented 1 year ago

CMake: Fix new FLAMEGPU source_group rules when build is not a child of FLAMEGPU_ROOT

Due to the dynamic version.cpp file, which is placed in the build directory, source_group TREE could fail when the build directory was not a child of FLAMEGPU_ROOT. I.e. when FLAMEGPU/FLAMEGPU2 is fetched via CMake FetchContent.

This applies similar filtering to examples, where source_group(TREE) is only used when appropriate.


Manually tested on windows, with FLAMEGPU/FLAMEGPU2 and FLAMEGPU/FLAMEGPU2-model-template-cpp