Skip to content

Commit

Permalink
corrosion_import_crate: Fix PROFILE argument in combination with CRAT…
Browse files Browse the repository at this point in the history
…ES (#496)

Do not forward the PROFILE argument from `corrosion_import_crate`
to `_generator_add_cargo_targets`.
The PROFILE argument is forwarded via a target property set during
`corrosion_import_crate`. The remaining argument forwarding can
cause issues when combined with a multi-value-argument,
such as `CRATES`.

---------

Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>

(cherry picked from commit d5bdbfa)
  • Loading branch information
jschwe committed Apr 3, 2024
1 parent 8ddd6d5 commit fa8b6f9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions cmake/Corrosion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,6 @@ function(corrosion_import_crate)
_corrosion_option_passthrough_helper(FROZEN COR frozen)
_corrosion_arg_passthrough_helper(CRATES COR crate_allowlist)
_corrosion_arg_passthrough_helper(CRATE_TYPES COR crate_types)
_corrosion_arg_passthrough_helper(PROFILE COR cargo_profile)

if(COR_PROFILE)
if(Rust_VERSION VERSION_LESS 1.57.0)
Expand Down Expand Up @@ -1082,7 +1081,6 @@ function(corrosion_import_crate)
${_CORROSION_CONFIGURATION_ROOT}
${crates_args}
${crate_types}
${cargo_profile_native_generator}
--imported-crates=imported_crates
${passthrough_to_acb}
-o ${generated_cmake}
Expand All @@ -1102,7 +1100,6 @@ function(corrosion_import_crate)
imported_crates
${crate_allowlist}
${crate_types}
${cargo_profile}
${no_linker_override}
)
endif()
Expand Down

0 comments on commit fa8b6f9

Please sign in to comment.