RangeShifter / RangeShifter_batch

RangeShifter batch version with new structure using subtree for RS core files
GNU General Public License v3.0
0 stars 0 forks source link

Trigger debug mode through argument rather than #define #12

Closed TheoPannetier closed 9 months ago

TheoPannetier commented 11 months ago

In order to run reproducible tests, we need to run RangeShifter with a fixed seed, which is currently only available in Debug Mode. Debug Mode is triggered by a #define directive in Version.h, such that we have to choose between either running a random seed on test or shipping the source code in Debug mode. Enabling Debug through an argument (e.g. ./rs.exe -debug) rather than #define would solve the dilemma.

TheoPannetier commented 9 months ago

An argument is probably not the best way to do this, in hindsight. Now that we rs batch uses CMake, Debug mode is still triggered via a #RSDEBUG macro passed to the build target. There are certainly smarter ways to do this via CMake, but this is beyond my current skill. In any case, we don't need Version.h anymore, so this can be closed.