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

QL_PACKAGE_VERSION does not exist when quantlib was built with cmake instead of autotools #180

Closed
jeroen opened this issue Jan 25, 2024 · 3 comments · Fixed by #181
Closed

Comments

@jeroen
Copy link
Contributor

jeroen commented Jan 25, 2024

I see:

utils.cpp:651:24: error: use of undeclared identifier 'QL_PACKAGE_VERSION'
  651 |     return std::string(QL_PACKAGE_VERSION);
      |                        ^
1 warning and 1 error generated.

It turns out when quantlib is built with cmake instead of autotools, the include/ql/config.hpp looks like so:

#ifndef quantlib_config_h
#define quantlib_config_h

#define PACKAGE_NAME "QuantLib"
#define PACKAGE_STRING "QuantLib 1.32.0"
#define PACKAGE_TARNAME "QuantLib-1.32.0"
#define PACKAGE_VERSION "1.32.0"
#define PACKAGE_BUGREPORT "https://github.com/lballabio/QuantLib/issues/"
@eddelbuettel
Copy link
Owner

How irritating. Should we add another define / alias ? Or I guess I can handle it in utils.cpp conditionally.

@jeroen
Copy link
Contributor Author

jeroen commented Jan 25, 2024

That PR fixes it already

@eddelbuettel
Copy link
Owner

Yes that (sub-aspect too) is perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants