Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Koch
dune-common
Commits
0d9b4675
Commit
0d9b4675
authored
11 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
[CMake][release] Fix bug in dependency version checking.
Now <= and >= are correctly treated.
parent
65fb9105
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/modules/DuneMacros.cmake
+18
-17
18 additions, 17 deletions
cmake/modules/DuneMacros.cmake
with
18 additions
and
17 deletions
cmake/modules/DuneMacros.cmake
+
18
−
17
View file @
0d9b4675
...
...
@@ -111,7 +111,7 @@ macro(find_dune_package module)
string
(
REPLACE
${
ProjectName
}
${
module
}
${
module
}
_DIR
${
PROJECT_BINARY_DIR
}
)
endif
()
find_package
(
${
module
}
${
DUNE_FIND_VERSION_STRING
}
NO_CMAKE_PACKAGE_REGISTRY
)
find_package
(
${
module
}
NO_CMAKE_PACKAGE_REGISTRY
)
endif
(
NOT
${
module
}
_FOUND
)
if
(
NOT
${
module
}
_FOUND
)
message
(
STATUS
"No full CMake package configuration support available."
...
...
@@ -170,22 +170,23 @@ macro(find_dune_package module)
get_filename_component
(
_dune_module_file_path
${
_dune_module_file
}
PATH
)
dune_module_information
(
${
_dune_module_file_path
}
)
# QUIET)
set
(
${
module
}
_dune_module 1
)
set
(
DUNE_FIND_MOD_VERSION_STRING
"
${
DUNE_VERSION_MAJOR
}
.
${
DUNE_VERSION_MINOR
}
.
${
DUNE_VERSION_REVISION
}
"
)
unset
(
module_version_wrong
)
if
(
DUNE_FIND_VERSION_OP MATCHES
"="
AND
NOT
(
DUNE_FIND_MOD_VERSION_STRING VERSION_EQUAL DUNE_FIND_VERSION_STRING
))
set
(
module_version_wrong 1
)
endif
()
if
(
DUNE_FIND_VERSION_OP MATCHES
">="
AND
NOT
(
DUNE_FIND_MOD_VERSION_STRING VERSION_EQUAL DUNE_FIND_VERSION_STRING OR
DUNE_FIND_MOD_VERSION_STRING VERSION_GREATER DUNE_FIND_VERSION_STRING
))
set
(
module_version_wrong 1
)
endif
()
if
(
DUNE_FIND_VERSION_OP MATCHES
"<="
AND
NOT
(
DUNE_FIND_MOD_VERSION_STRING VERSION_EQUAL DUNE_FIND_VERSION_STRING OR
DUNE_FIND_MOD_VERSION_STRING VERSION_LESS DUNE_FIND_VERSION_STRING
))
set
(
module_version_wrong 1
)
endif
()
set
(
DUNE_FIND_MOD_VERSION_STRING
"
${
DUNE_VERSION_MAJOR
}
.
${
DUNE_VERSION_MINOR
}
.
${
DUNE_VERSION_REVISION
}
"
)
# check whether dependency mathes version requirement
unset
(
module_version_wrong
)
if
(
DUNE_FIND_VERSION_OP MATCHES
">="
)
if
(
NOT
(
DUNE_FIND_MOD_VERSION_STRING VERSION_EQUAL DUNE_FIND_VERSION_STRING OR
DUNE_FIND_MOD_VERSION_STRING VERSION_GREATER DUNE_FIND_VERSION_STRING
))
set
(
module_version_wrong 1
)
endif
()
elseif
(
DUNE_FIND_VERSION_OP MATCHES
"<="
)
if
(
NOT
(
DUNE_FIND_MOD_VERSION_STRING VERSION_EQUAL DUNE_FIND_VERSION_STRING OR
DUNE_FIND_MOD_VERSION_STRING VERSION_LESS DUNE_FIND_VERSION_STRING
))
set
(
module_version_wrong 1
)
endif
()
elseif
(
DUNE_FIND_VERSION_OP MATCHES
"="
AND
NOT
(
DUNE_FIND_MOD_VERSION_STRING VERSION_EQUAL DUNE_FIND_VERSION_STRING
))
set
(
module_version_wrong 1
)
endif
()
endif
(
EXISTS
${
_dune_module_file
}
)
endforeach
()
if
(
NOT
${
module
}
_dune_module
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment