Skip to content

Commit

Permalink
cbindgen/cxx: Add warnings for unknown arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwe committed Jan 1, 2025
1 parent ae40958 commit 573d73b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmake/Corrosion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,13 @@ function(corrosion_add_cxxbridge cxx_target)
endif()
endforeach()

if(DEFINED _arg_UNPARSED_ARGUMENTS)
message(AUTHOR_WARNING "corrosion_add_cxxbridge was called with the following unknown arguments: "
"`${_arg_UNPARSED_ARGUMENTS}`\n"
"Unknown arguments will be ignored."
)
endif()

get_target_property(manifest_path "${_arg_CRATE}" INTERFACE_COR_PACKAGE_MANIFEST_PATH)

if(NOT EXISTS "${manifest_path}")
Expand Down Expand Up @@ -1902,6 +1909,13 @@ function(corrosion_experimental_cbindgen)
endif()
endforeach()
set(rust_target "${CCN_TARGET}")

if(DEFINED CCN_UNPARSED_ARGUMENTS)
message(AUTHOR_WARNING "corrosion_experimental_cbindgen was called with the following unknown arguments: "
"`${CCN_UNPARSED_ARGUMENTS}`\n"
"Unknown arguments will be ignored."
)
endif()
unset(package_manifest_dir)


Expand Down

0 comments on commit 573d73b

Please sign in to comment.