FLAMEGPU / FLAMEGPU2

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

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

Closed ptheywood closed 9 months ago

ptheywood commented 9 months 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