summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2022-10-11 09:31:43 -0500
committerChad Elliott <elliottc@objectcomputing.com>2022-10-11 09:31:43 -0500
commitb3dbad5d84d83bcf809e7aba458627b6014d6d71 (patch)
tree6a2afed7bc1eb02aa19db05d73501c289c9f47b7 /modules
parente6d869bed6cacb8efae257d265bb7b97f169d8a5 (diff)
downloadMPC-b3dbad5d84d83bcf809e7aba458627b6014d6d71.tar.gz
Added dynamicflags, staticflags, libpaths, and macros. Corrected basic support for custom types.
Diffstat (limited to 'modules')
-rw-r--r--modules/CMakeProjectCreator.pm21
1 files changed, 14 insertions, 7 deletions
diff --git a/modules/CMakeProjectCreator.pm b/modules/CMakeProjectCreator.pm
index 991a8a82..cf9883d0 100644
--- a/modules/CMakeProjectCreator.pm
+++ b/modules/CMakeProjectCreator.pm
@@ -56,14 +56,21 @@ sub fill_value {
## Currently, we only support C++
return 'CXX' if ($self->get_language() eq Creator::cplusplus());
}
- elsif ($name eq 'env_includes') {
- my $includes = $self->get_assignment('includes');
- if (defined $includes) {
- $includes = $self->create_array($includes);
- foreach my $include (@$includes) {
- $include =~ s/\$\(([^\)]+)\)/\$ENV{$1}/g;
+ elsif ($name =~ /^env_(\w+)/) {
+ my $dotdir = ($1 eq 'libpaths' ? '${CMAKE_CURRENT_BIN_DIR}' :
+ '${CMAKE_CURRENT_SOURCE_DIR}');
+ my $paths = $self->get_assignment($1);
+ if (defined $paths) {
+ $paths = $self->create_array($paths);
+ foreach my $path (@$paths) {
+ if ($path eq '.') {
+ $path = $dotdir;
+ }
+ else {
+ $path =~ s/\$\(([^\)]+)\)/\$ENV{$1}/g;
+ }
}
- return "@$includes";
+ return "@$paths";
}
}
elsif ($name eq 'non_generated_sources') {