forked from eclipse/xacc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow saying find_package(XACC 1.0.0)
This creates a version file so that you can specify a version for find_package(XACC), like find_package(XACC 1.0.0). For more info, see: https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-version-selection
- Loading branch information
Showing
3 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
set(PACKAGE_VERSION "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@") | ||
# The quotes for the right operand are intentional here: if CMake executes this | ||
# file without ${PACKAGE_FIND_VERSION} set, then if() will still get three | ||
# operands. Without the quotes, if() will only get two operands in that case, | ||
# throwing an error. | ||
if(${PACKAGE_VERSION} VERSION_GREATER_EQUAL "${PACKAGE_FIND_VERSION}") | ||
set(PACKAGE_VERSION_COMPATIBLE 1) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters