cache.toml cannot be found
Description
While building and running fpm-modules, I noticed that my code stopped working while it used to work with version v0.12.0.
According to the runtime error, the 'cache.toml cannot be found'
I spotted the difference below that could explain the problem.
While I can fix this easily on my end, would it be possible to initiate the value of the build folder to 'build' and ensure backward compatibility?
Expected Behaviour
The build folder should be initialized to some default value (e.g. 'build')
Version of fpm
main
Platform and Architecture
Windows 10
Additional Information
No response
Thank you for posting this @davidpfister - Looking at the code, I see the fpm_build_settings are properly validated on CLI initialization, which is the expected behavior. However, you may be getting an empty build directory because you're building the structure yourself. Because the build-directory feature will be officially released in the upcoming release, perhaps a solution for you would be to pinpoint the fpm dependency to 0.12.0. Otherwise, what solution would you propose? I would avoid introducing final procedures at least until all compilers support them robustly.
@perazz, indeed, I embedded fpm for building the dependency tree, and therefore, I am building the model myself. For the moment, I have already done what you proposed and targeted explicitly the version v0.12.0. As a safeguard, you could add
if (len_trim(settings%build_dir) == 0) settings%build_dir = 'build'
at line 46 in the screenshot. (or check the allocation status, whatever is best)
Of course, once released I will change my code and add an explicit location for the build_dir