Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
822fc572
Commit
822fc572
authored
7 years ago
by
Daniel Agar
Committed by
ChristophTobler
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cmake px4_add_module() make properties private
parent
fc808468
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/common/px4_base.cmake
+10
-13
10 additions, 13 deletions
cmake/common/px4_base.cmake
with
10 additions
and
13 deletions
cmake/common/px4_base.cmake
+
10
−
13
View file @
822fc572
...
...
@@ -205,12 +205,6 @@ function(px4_add_module)
set
(
STACK_MAIN_DEFAULT 1024
)
set
(
PRIORITY_DEFAULT SCHED_PRIORITY_DEFAULT
)
# default stack max to stack main
if
(
NOT STACK_MAIN AND STACK
)
set
(
STACK_MAIN
${
STACK
}
)
message
(
AUTHOR_WARNING
"STACK deprecated, USE STACK_MAIN instead!"
)
endif
()
foreach
(
property MAIN STACK_MAIN PRIORITY
)
if
(
NOT
${
property
}
)
set
(
${
property
}
${${
property
}
_DEFAULT
}
)
...
...
@@ -227,15 +221,18 @@ function(px4_add_module)
if
(
${
OS
}
STREQUAL
"qurt"
)
set_property
(
TARGET
${
MODULE
}
PROPERTY POSITION_INDEPENDENT_CODE TRUE
)
elseif
(
${
OS
}
STREQUAL
"nuttx"
)
list
(
APPEND COMPILE_FLAGS
-Wframe-larger-than=
${
STACK_MAX
}
)
target_compile_options
(
${
MODULE
}
PRIVATE
-Wframe-larger-than=
${
STACK_MAX
}
)
endif
()
if
(
MAIN
)
set_target_properties
(
${
MODULE
}
PROPERTIES
COMPILE_DEFINITIONS PX4_MAIN=
${
MAIN
}
_app_main
)
add_definitions
(
-DMODULE_NAME=
"
${
MAIN
}
"
)
target_compile_definitions
(
${
MODULE
}
PRIVATE PX4_MAIN=
${
MAIN
}
_app_main
)
target_compile_definitions
(
${
MODULE
}
PRIVATE MODULE_NAME=
"
${
MAIN
}
"
)
else
()
add_definitions
(
-DMODULE_NAME=
"
${
MODULE
}
"
)
target_compile_definitions
(
${
MODULE
}
PRIVATE MODULE_NAME=
"
${
MODULE
}
"
)
endif
()
if
(
COMPILE_FLAGS
)
target_compile_options
(
${
MODULE
}
PRIVATE
${
COMPILE_FLAGS
}
)
endif
()
if
(
INCLUDES
)
...
...
@@ -247,7 +244,7 @@ function(px4_add_module)
endif
()
# join list variables to get ready to send to compiler
foreach
(
prop LINK_FLAGS
COMPILE_FLAGS
)
foreach
(
prop LINK_FLAGS
)
if
(
${
prop
}
)
px4_join
(
OUT
${
prop
}
LIST
${${
prop
}}
GLUE
" "
)
endif
()
...
...
@@ -259,7 +256,7 @@ function(px4_add_module)
if
(
COMPILE_FLAGS AND
${
_no_optimization_for_target
}
)
px4_strip_optimization
(
COMPILE_FLAGS
${
COMPILE_FLAGS
}
)
endif
()
foreach
(
prop
COMPILE_FLAGS
LINK_FLAGS STACK_MAIN MAIN PRIORITY
)
foreach
(
prop LINK_FLAGS STACK_MAIN MAIN PRIORITY
)
if
(
${
prop
}
)
set_target_properties
(
${
MODULE
}
PROPERTIES
${
prop
}
${${
prop
}}
)
endif
()
...
...
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