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
Parse Poco version and make available in header file #242
Conversation
if ("${POCO_VERSION_MINOR}" STREQUAL "") | ||
set( POCO_VERSION_MINOR "0") | ||
endif() | ||
|
||
string( SUBSTRING ${POCO_VERSION} 4 2 POCO_VERSION_PATCH ) | ||
string( REGEX REPLACE "^0" "" POCO_VERSION_PATCH ${POCO_VERSION_PATCH} ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change this to string( REGEX REPLACE "^0\(.\)" "\\1" POCO_VERSION_PATCH ${POCO_VERSION_PATCH} )
instead of the additional if
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I just updated the branch to include this line in place of the if statements.
I'm happy to merge this, but it is currently showing as a new file in git. There must be some way around that. Please add the appropriate line to |
PocoVersion.h has been added to .gitignore |
…sion Parse Poco version and make available in header file
This fixes ticket #11117
The Poco version is defined as a hex value that cannot be directly used in preprocessor directives. Instead of parsing this value at run time, we use cmake to configure a header file that defines the major, minor and patch versions. In addition, we fix FindPoco.cmake so that version "00" returns "0" instead of an empty string.
Testing: Verify that the file Code/Mantid/Framework/Kernel/inc/MantidKernel/PocoVersion.h was created and that the versions match the version of Poco used to build Mantid.