pixie16 / paass

Pixie Acquisition and Analysis Software Suite
https://pixie16.github.io/paassdoc/
GNU General Public License v3.0
10 stars 29 forks source link

If XIA or PLX isn't installed then the build will fail while searching for the missing option #224

Closed spaulaus closed 7 years ago

spaulaus commented 7 years ago

The logic to automatically toggle BUILD_SUITE to off was slightly flawed. The original logic looked like this

if (BUILD_ACQ)
    if(NOT BUILD_ACQ_ATTEMPTED AND NOT PLX_FOUND AND NOT XIA_FOUND)
        set (BUILD_ACQ OFF CACHE BOOL "Build and install PixieSuite" FORCE)
        else (PLX_FOUND OR XIA_FOUND)
...

This would cause the build to fail if the user has only one of the two packages installed (either PLX or XIA). You can consider that users may install PLX if they have other PLX devices on there system. Alternatively, the users could want only XIA if they're working on something related to set files, var files, etc.

The logic should be amended to the following

if (BUILD_ACQ)
    if(NOT BUILD_ACQ_ATTEMPTED AND NOT (PLX_FOUND AND XIA_FOUND))
                FF CACHE BOOL "Build and install PixieSuite" FORCE)
        else (PLX_FOUND OR XIA_FOUND)
...

This prevents the error message from occurring.

ksmith0 commented 7 years ago

I would not call it flawed, the original intent was to have this functionality as it was thought that the user would only install these packages if they were using the ACQ.