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
1a9e2ac7
Commit
1a9e2ac7
authored
7 years ago
by
Daniel Agar
Browse files
Options
Downloads
Patches
Plain Diff
cmake NuttX wrapper work around windows cygwin path issues
parent
fedc9abb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platforms/nuttx/NuttX/CMakeLists.txt
+18
-12
18 additions, 12 deletions
platforms/nuttx/NuttX/CMakeLists.txt
with
18 additions
and
12 deletions
platforms/nuttx/NuttX/CMakeLists.txt
+
18
−
12
View file @
1a9e2ac7
...
...
@@ -39,29 +39,35 @@ file(GLOB_RECURSE copy_apps_files
${
CMAKE_CURRENT_SOURCE_DIR
}
/apps/*
)
# copy nuttx to build directory
file
(
RELATIVE_PATH CP_SRC
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/nuttx
)
add_custom_command
(
OUTPUT nuttx_copy.stamp
COMMAND
${
cp_cmd
}
${
cp_opts
}
${
CP_SRC
}
.
COMMAND cmake -E touch nuttx_copy.stamp
file
(
RELATIVE_PATH CP_SRC
${
CMAKE_SOURCE_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/nuttx
)
file
(
RELATIVE_PATH CP_DST
${
CMAKE_SOURCE_DIR
}
${
PX4_BINARY_DIR
}
/NuttX
)
add_custom_command
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/nuttx_copy.stamp
COMMAND
${
cp_cmd
}
${
cp_opts
}
${
CP_SRC
}
${
CP_DST
}
COMMAND cmake -E touch
${
CMAKE_CURRENT_BINARY_DIR
}
/nuttx_copy.stamp
DEPENDS
${
copy_nuttx_files
}
git_nuttx
COMMENT
"Copying NuttX/nuttx to
${
CMAKE_CURRENT_BINARY_DIR
}
"
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
)
set
(
NUTTX_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/nuttx
)
set
(
NUTTX_CONFIG_DIR
${
PX4_SOURCE_DIR
}
/nuttx-configs
)
# copy apps to build directory
file
(
RELATIVE_PATH CP_SRC
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/apps
)
add_custom_command
(
OUTPUT apps_copy.stamp
COMMAND
${
cp_cmd
}
${
cp_opts
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/apps .
COMMAND cmake -E touch apps_copy.stamp
file
(
RELATIVE_PATH CP_SRC
${
CMAKE_SOURCE_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/apps
)
file
(
RELATIVE_PATH CP_DST
${
CMAKE_SOURCE_DIR
}
${
PX4_BINARY_DIR
}
/NuttX
)
add_custom_command
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/apps_copy.stamp
COMMAND
${
cp_cmd
}
${
cp_opts
}
${
CP_SRC
}
${
CP_DST
}
COMMAND cmake -E touch
${
CMAKE_CURRENT_BINARY_DIR
}
/apps_copy.stamp
DEPENDS
${
copy_apps_files
}
git_nuttx_apps
COMMENT
"Copying NuttX/apps to
${
CMAKE_CURRENT_BINARY_DIR
}
"
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
)
set
(
APPS_DIR
${
PX4
_BINARY_DIR
}
/
NuttX/
apps
)
set
(
APPS_DIR
${
CMAKE_CURRENT
_BINARY_DIR
}
/apps
)
# copy PX4 board config into nuttx
file
(
GLOB_RECURSE board_config_files
${
NUTTX_CONFIG_DIR
}
/
${
BOARD
}
)
file
(
RELATIVE_PATH CP_SRC
${
CMAKE_SOURCE_DIR
}
${
NUTTX_CONFIG_DIR
}
/
${
BOARD
}
)
file
(
RELATIVE_PATH CP_DST
${
CMAKE_SOURCE_DIR
}
${
NUTTX_DIR
}
/configs
)
add_custom_command
(
OUTPUT
${
NUTTX_DIR
}
/PX4_Config.mk
${
NUTTX_DIR
}
/PX4_Warnings.mk
...
...
@@ -71,16 +77,16 @@ add_custom_command(OUTPUT
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
NUTTX_CONFIG_DIR
}
/PX4_Warnings.mk
${
NUTTX_DIR
}
/PX4_Warnings.mk
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
NUTTX_CONFIG_DIR
}
/
${
BOARD
}
/
${
nuttx_config_type
}
/defconfig
${
NUTTX_DIR
}
/.config
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
NUTTX_CONFIG_DIR
}
/
${
BOARD
}
/
${
nuttx_config_type
}
/Make.defs
${
NUTTX_DIR
}
/Make.defs
COMMAND
${
cp_cmd
}
${
cp_opts
}
${
NUTTX_CONFIG_DIR
}
/
${
BOARD
}
${
NUTTX_DIR
}
/configs/
COMMAND
${
CMAKE_COMMAND
}
-E remove -f
${
NUTTX_DIR
}
/include/nuttx/config.h
COMMAND cd
${
CMAKE_SOURCE_DIR
}
&&
${
cp_cmd
}
${
cp_opts
}
${
CP_SRC
}
${
CP_DST
}
DEPENDS
${
NUTTX_CONFIG_DIR
}
/PX4_Config.mk
${
NUTTX_CONFIG_DIR
}
/PX4_Warnings.mk
${
NUTTX_CONFIG_DIR
}
/
${
BOARD
}
/
${
nuttx_config_type
}
/defconfig
${
NUTTX_CONFIG_DIR
}
/
${
BOARD
}
/
${
nuttx_config_type
}
/Make.defs
${
board_config_files
}
nuttx_copy.stamp
apps_copy.stamp
${
CMAKE_CURRENT_BINARY_DIR
}
/
nuttx_copy.stamp
${
CMAKE_CURRENT_BINARY_DIR
}
/
apps_copy.stamp
WORKING_DIRECTORY
${
NUTTX_DIR
}
/tools
COMMENT
"Copying NuttX config
${
BOARD
}
and configuring"
)
...
...
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