From 093688635b9e4b56d89c2afa86479529e41a527b Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 9 May 2022 15:51:53 -0700 Subject: [PATCH] ign_install_all_headers Signed-off-by: Louise Poubel --- cmake/IgnUtils.cmake | 28 ++++++++++++++----- .../include/no_ign/CMakeLists.txt | 2 +- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/cmake/IgnUtils.cmake b/cmake/IgnUtils.cmake index 34c2d3df..04ef252b 100644 --- a/cmake/IgnUtils.cmake +++ b/cmake/IgnUtils.cmake @@ -616,7 +616,7 @@ function(gz_get_sources sources_var) endfunction() ################################################# -# ign_install_all_headers( +# gz_install_all_headers( # [EXCLUDE_FILES ] # [EXCLUDE_DIRS ] # [GENERATED_HEADERS ] @@ -642,17 +642,31 @@ endfunction() # config.hh file since it would be redundant with the core library. # function(ign_install_all_headers) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_install_all_headers is deprecated, use gz_install_all_headers instead.") - #------------------------------------ - # Define the expected arguments set(options) - set(oneValueArgs COMPONENT) # We are not using oneValueArgs yet + set(oneValueArgs COMPONENT) set(multiValueArgs EXCLUDE_FILES EXCLUDE_DIRS GENERATED_HEADERS) - - #------------------------------------ - # Parse the arguments _gz_cmake_parse_arguments(gz_install_all_headers "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + set(gz_install_all_headers_skip_parsing true) + gz_install_all_headers() +endfunction() +function(gz_install_all_headers) + + # Deprecated, remove skip parsing logic in version 4 + if (NOT gz_install_all_headers_skip_parsing) + #------------------------------------ + # Define the expected arguments + set(options) + set(oneValueArgs COMPONENT) + set(multiValueArgs EXCLUDE_FILES EXCLUDE_DIRS GENERATED_HEADERS) + + #------------------------------------ + # Parse the arguments + _gz_cmake_parse_arguments(gz_install_all_headers "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + endif() #------------------------------------ # Build the list of directories diff --git a/examples/no_ignition_prefix/include/no_ign/CMakeLists.txt b/examples/no_ignition_prefix/include/no_ign/CMakeLists.txt index 439642e6..bf4411e8 100644 --- a/examples/no_ignition_prefix/include/no_ign/CMakeLists.txt +++ b/examples/no_ignition_prefix/include/no_ign/CMakeLists.txt @@ -1 +1 @@ -ign_install_all_headers() +gz_install_all_headers()