From fb7521eb5eb26d5d5d7ee8b81c2dd884f6e8c99b Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sun, 15 Sep 2019 13:49:51 -0400 Subject: [PATCH] cmake px4_base -> px4_parse_function_args --- CMakeLists.txt | 1 + cmake/gtest/px4_add_gtest.cmake | 2 -- cmake/px4_add_board.cmake | 2 -- cmake/px4_add_common_flags.cmake | 2 -- cmake/px4_add_library.cmake | 2 -- cmake/px4_add_module.cmake | 2 -- cmake/px4_git.cmake | 2 -- ...{px4_base.cmake => px4_parse_function_args.cmake} | 12 +----------- platforms/nuttx/cmake/px4_impl_os.cmake | 2 -- platforms/posix/cmake/px4_impl_os.cmake | 6 ++---- platforms/qurt/cmake/px4_impl_os.cmake | 2 -- 11 files changed, 4 insertions(+), 31 deletions(-) rename cmake/{px4_base.cmake => px4_parse_function_args.cmake} (95%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 256a9dac9a..6169446bcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,6 +105,7 @@ set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake) +include(px4_parse_function_args) #============================================================================= # git diff --git a/cmake/gtest/px4_add_gtest.cmake b/cmake/gtest/px4_add_gtest.cmake index 8507b0d2fc..c85a7248e8 100644 --- a/cmake/gtest/px4_add_gtest.cmake +++ b/cmake/gtest/px4_add_gtest.cmake @@ -31,8 +31,6 @@ # ############################################################################ -include(px4_base) - #============================================================================= # # px4_add_gtest diff --git a/cmake/px4_add_board.cmake b/cmake/px4_add_board.cmake index 0c35b1cb6c..7dbc5e2903 100644 --- a/cmake/px4_add_board.cmake +++ b/cmake/px4_add_board.cmake @@ -31,8 +31,6 @@ # ############################################################################ -include(px4_base) - #============================================================================= # # px4_add_board diff --git a/cmake/px4_add_common_flags.cmake b/cmake/px4_add_common_flags.cmake index 4f5507bf5a..da84cc8e10 100644 --- a/cmake/px4_add_common_flags.cmake +++ b/cmake/px4_add_common_flags.cmake @@ -31,8 +31,6 @@ # ############################################################################ -include(px4_base) - #============================================================================= # # px4_add_common_flags diff --git a/cmake/px4_add_library.cmake b/cmake/px4_add_library.cmake index 2a6377c71a..8fedf801ef 100644 --- a/cmake/px4_add_library.cmake +++ b/cmake/px4_add_library.cmake @@ -31,8 +31,6 @@ # ############################################################################ -include(px4_base) - #============================================================================= # # px4_add_library diff --git a/cmake/px4_add_module.cmake b/cmake/px4_add_module.cmake index b0c1b160fe..5416699390 100644 --- a/cmake/px4_add_module.cmake +++ b/cmake/px4_add_module.cmake @@ -31,8 +31,6 @@ # ############################################################################ -include(px4_base) - #============================================================================= # # px4_add_module diff --git a/cmake/px4_git.cmake b/cmake/px4_git.cmake index e70bf503c0..1f35203ccd 100644 --- a/cmake/px4_git.cmake +++ b/cmake/px4_git.cmake @@ -31,8 +31,6 @@ # ############################################################################ -include(px4_base) - #============================================================================= # # px4_add_git_submodule diff --git a/cmake/px4_base.cmake b/cmake/px4_parse_function_args.cmake similarity index 95% rename from cmake/px4_base.cmake rename to cmake/px4_parse_function_args.cmake index d7794ea6a5..cee0827c78 100644 --- a/cmake/px4_base.cmake +++ b/cmake/px4_parse_function_args.cmake @@ -31,17 +31,6 @@ # ############################################################################ -#============================================================================= -# -# Defined functions in this file -# -# utility functions -# -# * px4_parse_function_args -# - -include(CMakeParseArguments) - #============================================================================= # # px4_parse_function_args @@ -88,6 +77,7 @@ include(CMakeParseArguments) # name: hello # list: a b c # +include(CMakeParseArguments) function(px4_parse_function_args) cmake_parse_arguments(IN "" "NAME" "OPTIONS;ONE_VALUE;MULTI_VALUE;REQUIRED;ARGN" "${ARGN}") diff --git a/platforms/nuttx/cmake/px4_impl_os.cmake b/platforms/nuttx/cmake/px4_impl_os.cmake index 7c98a88b4d..0f237d2e7d 100644 --- a/platforms/nuttx/cmake/px4_impl_os.cmake +++ b/platforms/nuttx/cmake/px4_impl_os.cmake @@ -42,8 +42,6 @@ # * px4_os_prebuild_targets # -include(px4_base) - #============================================================================= # # px4_os_add_flags diff --git a/platforms/posix/cmake/px4_impl_os.cmake b/platforms/posix/cmake/px4_impl_os.cmake index cbee631e3b..e88a584bac 100644 --- a/platforms/posix/cmake/px4_impl_os.cmake +++ b/platforms/posix/cmake/px4_impl_os.cmake @@ -46,8 +46,6 @@ # * px4_os_prebuild_targets # -include(px4_base) - #============================================================================= # # px4_posix_generate_builtin_commands @@ -219,7 +217,7 @@ function(px4_os_add_flags) -D__PX4_POSIX -Dnoreturn_function=__attribute__\(\(noreturn\)\) ) - + include_directories(platforms/posix/include) if ("${PX4_BOARD}" MATCHES "sitl") @@ -314,7 +312,7 @@ function(px4_os_add_flags) set(LIBROBOTCONTROL_INSTALL_DIR $ENV{LIBROBOTCONTROL_INSTALL_DIR}) # On cross compile host system and native build system: - # a) select and define LIBROBOTCONTROL_INSTALL_DIR environment variable so that + # a) select and define LIBROBOTCONTROL_INSTALL_DIR environment variable so that # other unwanted headers will not be included # b) install robotcontrol.h and rc/* into $LIBROBOTCONTROL_INSTALL_DIR/include # c) install pre-built native (ARM) version of librobotcontrol.* into $LIBROBOTCONTROL_INSTALL_DIR/lib diff --git a/platforms/qurt/cmake/px4_impl_os.cmake b/platforms/qurt/cmake/px4_impl_os.cmake index 94cdb61c23..a3fa032bf8 100644 --- a/platforms/qurt/cmake/px4_impl_os.cmake +++ b/platforms/qurt/cmake/px4_impl_os.cmake @@ -49,8 +49,6 @@ # * px4_os_prebuild_targets # -include(px4_base) - #============================================================================= # # px4_qurt_generate_builtin_commands