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

No VERSION keyword in srcs/CMakeLists.txt #3

Open
knoepfel opened this issue Oct 28, 2021 · 5 comments
Open

No VERSION keyword in srcs/CMakeLists.txt #3

knoepfel opened this issue Oct 28, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@knoepfel
Copy link
Contributor

This issue has been migrated from https://cdcvs.fnal.gov/redmine/issues/26382 (FNAL account required)
Originally created by @eflumerf on 2021-10-26 15:44:55


In artdaq_daqinterface, we check the results of our setup scripts to make sure that nothing was printed to stderr. We keep getting messages of the form:

WARNING: 
WARNING: could not identify a product/project version from product_deps or /home/mu2etrk/test_stand/ots_pasha_002/srcs/CMakeLists.txt. Ensure version is set in product_deps or with project() or CMAKE_PROJECT_VERSION_STRING project variable in CMakeLists.txt.
WARNING: 

Could we somehow add the VERSION keyword to the generated srcs/CMakeLists.txt?

@knoepfel knoepfel added the bug Something isn't working label Oct 28, 2021
@knoepfel
Copy link
Contributor Author

Comment by @lgarren on 2021-10-26 16:40:43


Eric, short answer: if you use mrb uv to update the version, it will update both ups/product_deps and the top level CMakeLists.txt:
mrb uv artdaq_daqinterface vx_yy_zz

This presumes that you are using a sufficiently recent mrb (the latest is v5_19_04). Give it a try and see if it works for you.

@knoepfel
Copy link
Contributor Author

Comment by @lgarren on 2021-10-26 16:43:05


Failed to mention that you don't actually need to change the version, you can use mrb uv for the existing version.

@knoepfel
Copy link
Contributor Author

Comment by @eflumerf on 2021-10-26 20:49:19


That fixes srcs/product/CMakeLists.txt, but I'm concerned about srcs/CMakeLists.txt (Which is generated by MRB and re-generated with mrb uc and mrbsetenv). Currently, I have a line like:

project(artdaq_MRB LANGUAGES NONE)

If I add VERSION 1.00.00 to the project call, the error goes away for one iteration, but the next time the srcs/CMakeLists.txt file is generated it gets reverted.

@knoepfel
Copy link
Contributor Author

Comment by @eflumerf on 2021-10-26 20:57:49


OK, I think the problem is that we are calling newDev without the -v flag, so the version doesn't get set in localProducts/setup. It might be nice if mrb could detect that it's looking at its own CMakeLists.txt and either ignore the error or print a different message (like "set MRB_PROJECT_VERSION in localProducts/setup").

@knoepfel
Copy link
Contributor Author

Comment by @chissg on 2021-10-26 21:42:25


mrbsetenv should fill this information from product_deps; unfortunately this is immediately overwritten by the automatic mrb uc that takes place immediately afterwards. This will be fixed in an upcoming version of MRB.

@knoepfel knoepfel added this to Issues Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants