diff options
author | Chad Elliott <elliottc@objectcomputing.com> | 2022-10-14 12:39:46 -0500 |
---|---|---|
committer | Chad Elliott <elliottc@objectcomputing.com> | 2022-10-14 12:39:46 -0500 |
commit | a106fb89d99beb7a3fd159078b9bf05693326509 (patch) | |
tree | 9b65eb490906e0a5a76a1426ea22218261ffdcbc /modules | |
parent | b6778ba290a3dade4e3eecbcb7eef3ced94789cb (diff) | |
download | MPC-a106fb89d99beb7a3fd159078b9bf05693326509.tar.gz |
Force CMake projects to be generated as if the user provided -use_env on the command line.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/CMakeProjectCreator.pm | 6 | ||||
-rw-r--r-- | modules/Creator.pm | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/modules/CMakeProjectCreator.pm b/modules/CMakeProjectCreator.pm index 86f99743..7ac73640 100644 --- a/modules/CMakeProjectCreator.pm +++ b/modules/CMakeProjectCreator.pm @@ -54,6 +54,12 @@ sub need_to_write_project { return $status; } +sub get_use_env { + ## Override the option getter so that, for CMake, MPC always functions as + ## if the -use_env option was supplied on the command line. + return 1; +} + sub pre_write_output_file { my $self = shift; return $self->combine_custom_types(); diff --git a/modules/Creator.pm b/modules/Creator.pm index 1d70dabe..00c64eac 100644 --- a/modules/Creator.pm +++ b/modules/Creator.pm @@ -1327,7 +1327,7 @@ sub get_initial_relative_values { sub get_secondary_relative_values { my $self = shift; - return ($self->{'use_env'} ? \%ENV : + return ($self->get_use_env() ? \%ENV : $self->{'relative'}), $self->{'expand_vars'}; } |