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

Parse Poco version and make available in header file #242

Merged
merged 5 commits into from Feb 23, 2015

Conversation

quantumsteve
Copy link
Contributor

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.

@quantumsteve quantumsteve added this to the Release 3.4 milestone Feb 18, 2015
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} )
Copy link
Member

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.

Copy link
Contributor Author

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.

@peterfpeterson peterfpeterson self-assigned this Feb 19, 2015
@peterfpeterson
Copy link
Member

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 Code/Mantid/Framework/Kernel/src/.gitignore.

@quantumsteve
Copy link
Contributor Author

PocoVersion.h has been added to .gitignore

peterfpeterson added a commit that referenced this pull request Feb 23, 2015
…sion

Parse Poco version and make available in header file
@peterfpeterson peterfpeterson merged commit cab91d0 into master Feb 23, 2015
@peterfpeterson peterfpeterson deleted the feature/11117_get_poco_version branch February 23, 2015 15:51
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 this pull request may close these issues.

None yet

3 participants