Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TEC Server Config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
MSK-SW
Infrastructure and Support
TEC
TEC Server Config
Commits
7d85edc8
Commit
7d85edc8
authored
1 year ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Patches
Plain Diff
chore(project-template): warn about add_dependency use
parent
26978992
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
update project template
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/add_dependency.cmake
+9
-1
9 additions, 1 deletion
cmake/add_dependency.cmake
with
9 additions
and
1 deletion
cmake/add_dependency.cmake
+
9
−
1
View file @
7d85edc8
...
...
@@ -54,7 +54,7 @@ FUNCTION(add_dependency dependency_project_name required_version)
ENDFUNCTION
(
add_dependency
)
# make sure that cmake finds modules provided by project-template.
# since with new cmake concept for imported targets, dependencies also search for implicit dependencies,
# since with new cmake concept for imported targets, dependencies also search for implicit dependencies,
# all projects using add_dependency also require this module path.
set
(
_projectTemplateModulePath
${
CMAKE_SOURCE_DIR
}
/cmake/Modules
)
# substr search is better than regex if paths have special characters
...
...
@@ -62,3 +62,11 @@ string(FIND ":${CMAKE_MODULE_PATH}:" ":${_projectTemplateModulePath}:" _projectT
if
(
${
_projectTemplateModulePathPos
}
EQUAL -1
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
_projectTemplateModulePath
}
"
)
endif
()
message
(
WARNING
"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You are using add_dependency() in your CMakeLists.txt which is deprecated and may lead to subtle problems. Please follow the project-template migration guide to cmake imported targets.
Furhter processing is delayed by 5 seconds.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E sleep 5.0
)
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