Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Feature Request: Recompile *_driver.F90 when new TEST_SOURCES added #380

Open
jphill4 opened this issue Oct 17, 2022 · 3 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jphill4
Copy link

jphill4 commented Oct 17, 2022

Another observation from my test suite migration: When a new .pf file is added to TEST_SOURCES for add_pfunit_ctest, the file gets processed and the *.inc file gets updated, but a re-compilation of the test program is not triggered. It would be nice for this re-build to happen automatically. One of these approaches should work:

https://cmake.org/cmake/help/latest/command/add_dependencies.html
https://stackoverflow.com/questions/40914497/why-doesnt-cmake-detect-dependency-on-my-generated-file

@jphill4
Copy link
Author

jphill4 commented Oct 17, 2022

(And thank you for making this resource available. I started with FRUIT because it was easy to start with, but moving to pFUnit has been great. Much simpler code).

@tclune
Copy link
Member

tclune commented Oct 23, 2022

Yeah - I've been annoyed by this for a long time, but do not actually know how to cleanly fix this. It probably is not hard, but it's not quite canonical CMake. My usual solution is to just do make clean in the offending directory. Rebuilds are faster than finding a solution. :-)

I'm happy to accept a patch for this, but realistically, I'm not likely to dig into this until some major revamp of the preprocessing facility.

@tclune tclune added enhancement New feature or request help wanted Extra attention is needed labels Oct 23, 2022
@jphill4
Copy link
Author

jphill4 commented Oct 24, 2022

Yep, fair enough. I will try to take a look at this once I get past the FY transition. I did something similar to what PF unit is doing for another project (compiling generated files), so I have an idea of what to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants