EMsoft-org / EMsoft

Public EMsoft repository
Other
61 stars 94 forks source link

EMsoftData_DIR not set after git pull #171

Open gpezza2 opened 1 year ago

gpezza2 commented 1 year ago

I seem to have run into a bug when building EMsoft 5.0.4 (develop branch) when making the Tests. Source/Test/CMakeLists.txtm Lines 88-100. First conditional checks if the EMsoftData_DIR location exists, and if so, sets it:

if(EXISTS "${EMSOFT_PARENT}/EMsoftData") set(EMsoftData_DIR ${EMSOFT_PARENT}/EMsoftData)

If it doesn't exists, it then does a git pull to get it. However, it then never sets the EMsoftData_DIR variable. If run on persistent storage, it seems running the setup twice will work as the first time pulls it then errors out further along, and second time it will find the directory and keep going. However, when trying to build an apptainer container, this doesn't work as the files get purged with every run. a manual git pull of the repo fixed it so it exists before the setup scripts are run. However, it might be better to just run the same "set(EMsoftData_DIR ${EMSOFT_PARENT}/EMsoftData)" after the "ExternalProject_Add" call completes.