From b53c52ac33e7f58ea3df456ee5fc17e4316636bf Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Mon, 27 Mar 2017 15:19:43 -0500 Subject: [PATCH] Separate ICG & SWIG exclusion constructs Refs #392 --- .gitignore | 1 + bin/trick-CP | 6 +- libexec/trick/convert_swig | 90 +++--- libexec/trick/create_top_dot_i | 3 +- libexec/trick/make_makefile_swig | 262 ++++++++---------- libexec/trick/pm/html.pm | 26 +- share/trick/makefiles/trickify.mk | 4 +- .../Interface_Code_Gen/HeaderSearchDirs.cpp | 2 +- .../Interface_Code_Gen/PrintAttributes.hh | 2 +- 9 files changed, 187 insertions(+), 209 deletions(-) diff --git a/.gitignore b/.gitignore index a42f0d41..e68000d7 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ bin/trick-trk2csv aclocal.m4 autom4te.cache trick_test +gmon.out diff --git a/bin/trick-CP b/bin/trick-CP index d75c3b6a..3544f2ea 100755 --- a/bin/trick-CP +++ b/bin/trick-CP @@ -116,11 +116,12 @@ build/Makefile_src: build/Makefile_src_deps build/Makefile_io_src S_source.hh build/Makefile_src_deps: ; # Create makefile for SWIG code -#build/Makefile_swig: build/ICG_processed -build/Makefile_swig: build/Makefile_io_src +build/Makefile_swig: S_source.hh build/Makefile_swig_deps $(PRINT_MAKEFILE_SWIG) $(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/make_makefile_swig +build/Makefile_swig_deps: ; + # Forcibly (re)create all SWIG input (.i) files. This rule is never run by the normal # build process. .PHONY: convert_swig @@ -148,6 +149,7 @@ ifeq ($(findstring ${MAKECMDGOALS},$(CLEAN_TARGETS)),) -include build/Makefile_src_deps -include build/Makefile_io_src -include build/Makefile_swig +-include build/Makefile_swig_deps -include build/Makefile_ICG endif -include S_overrides.mk diff --git a/libexec/trick/convert_swig b/libexec/trick/convert_swig index 54b072c7..13a2b896 100755 --- a/libexec/trick/convert_swig +++ b/libexec/trick/convert_swig @@ -13,6 +13,7 @@ use gte ; use trick_version ; use Digest::MD5 qw(md5_hex) ; use File::Path qw(make_path) ; +use html ; ## ## ================================================================================ @@ -51,8 +52,9 @@ my $help = ''; # option variable with default value (false) my $stls = 0; # option variable with default value (false) my ( @include_dirs , @defines) ; -my ( @swig_exclude_dirs) ; -my ( @exclude_dirs) ; +my @exclude_paths ; +my @swig_exclude_paths ; +my @ext_lib_paths ; my %sim ; my %out_of_date ; my ($version, $thread, $year) ; @@ -122,11 +124,9 @@ if ( $help ) { @include_dirs = $ENV{"TRICK_CFLAGS"} =~ /-I\s*(\S+)/g ; # get include paths from TRICK_CFLAGS -@swig_exclude_dirs = split /:/ , $ENV{"TRICK_SWIG_EXCLUDE"} ; -if ( scalar @swig_exclude_dirs == 0 ) { - @swig_exclude_dirs = split /:/ , $ENV{"TRICK_ICG_EXCLUDE"} ; -} -@exclude_dirs = split /:/ , $ENV{"TRICK_EXCLUDE"} ; +@exclude_paths = map abs_path($_), split /:/ , $ENV{"TRICK_EXCLUDE"} ; +@swig_exclude_paths = map abs_path($_), split /:/ , $ENV{"TRICK_SWIG_EXCLUDE"} ; +@ext_lib_paths = map abs_path($_), split /:/ , $ENV{"TRICK_EXT_LIB_DIRS"} ; @defines = $ENV{"TRICK_CFLAGS"} =~ /(-D\S+)/g ; # get defines from TRICK_CFLAGS if ( $ENV{"TRICK_CFLAGS"} !~ /DTRICK_VER=/ ) { push @defines , "-DTRICK_VER=$year" ; @@ -222,54 +222,50 @@ sub process_file() { ## For each of the #includes in the out_of_date header file ## create a corresponding %import directive. + outer: foreach (split /^/, $raw_contents) { - if ( /^(\s*\#\s*include\s+)([^\n]+)/ ) { - my ( $include ) = $1 ; - my ( $file_name ) = $2 ; + if ( /^\s*\#\s*include\s+([^\n]+)/ ) { + my $file_name = $1 ; + + # strip trailing whitespace $file_name =~ s/\s+$// ; - if ( $file_name !~ /\ includes + if ( $file_name =~ /\ ; - close FILE ; - chomp @icg_processed ; ($version, $thread) = get_trick_version() ; ($year) = $version =~ /^(\d+)/ ; ($cc = gte("TRICK_CC")) =~ s/\n// ; - @include_paths = $ENV{"TRICK_CFLAGS"} =~ /(-I\s*\S+)/g ; # get include paths from TRICK_CFLAGS + + # add -I paths and #defines + foreach my $value ( "TRICK_CFLAGS", "TRICK_CXXFLAGS" ) { + push @include_paths, $ENV{$value} =~ /(-I\s*\S+)/g ; + push @defines, $ENV{$value} =~ /(-D\S+)/g ; + } push @include_paths , ("-I".$ENV{"TRICK_HOME"}."/include") ; push @include_paths , ("-I".$ENV{"TRICK_HOME"}."/include/trick/compat") ; push @include_paths , ("-I".$ENV{"TRICK_HOME"}."/trick_source" , "-I../include") ; - @defines = $ENV{"TRICK_CFLAGS"} =~ /(-D\S+)/g ; # get defines from TRICK_CFLAGS push @defines , "-DTRICK_VER=$year" ; push @defines , "-DSWIG" ; push @defines , "-std=c++11" ; - # Get the list header files from the compiler to compare to what get_headers processed. + # get the list of header files from the compiler open FILE_LIST, "$cc -MM @include_paths @defines S_source.hh |" ; my $dir ; - $dir = dirname($s_source_full_path) ; + $dir = dirname(abs_path("S_source.hh")) ; + my %files ; + my %ext_libs ; while ( ) { next if ( /^#/ or /^\s+\\/ ) ; - my $word ; - foreach $word ( split ) { + outer: + foreach my $word ( split ) { next if ( $word eq "\\" or $word =~ /o:/ ) ; if ( $word !~ /^\// and $dir ne "\/" ) { $word = "$dir/$word" ; } $word = abs_path(dirname($word)) . "/" . basename($word) ; - # filter out system headers that are missed by the compiler -MM flag - next if ( $word =~ /^\/usr\/include/) ; - #print "gcc found $word\n" ; - $compiler_file_list{$word} = 1 ; + + # skip duplicate files + next if (exists($md5s{$word})) ; + + # remove system headers that are missed by the compiler -MM flag + next if ( $word =~ /^\/usr\/include/ ) ; + + # remove Trick headers + my $trick_home = $ENV{'TRICK_HOME'} ; + next if ( $word =~ /^\Q$trick_home\/include/ ) ; + next if ( $word =~ /^\Q$trick_home\/trick_source/ ) ; + + # remove paths in TRICK_EXCLUDE + foreach my $path ( @exclude_paths ) { + if ( $word =~ /^\Q$path\E(.*)/ ) { + print "SWIG Skip TRICK_EXCLUDE: $path$1\n" if $verbose_build ; + next outer ; + } + } + + # remove paths in TRICK_SWIG_EXCLUDE + foreach my $path ( @swig_exclude_paths ) { + if ( $word =~ /^\Q$path\E(.*)/ ) { + print "SWIG Skip TRICK_SWIG_EXCLUDE: $path$1\n" if $verbose_build ; + next outer ; + } + } + + # we'll be needing this later + $md5s{$word} = md5_hex($word) ; + + # separate paths in TRICK_EXT_LIB_DIRS + foreach my $path ( @ext_lib_paths ) { + if ( $word =~ /^\Q$path\E(.*)/ ) { + print "SWIG Skip TRICK_EXT_LIB_DIRS: $path$1\n" if $verbose_build ; + $ext_libs{$word} = 1 ; + next outer ; + } + } + $files{$word} = 1 ; } } - - foreach my $i ( @icg_processed ) { - $i = abs_path(dirname($i)) . "/" . basename($i) ; - if ( exists $compiler_file_list{$i} ) { - push @files_to_process , $i ; - } - } - - open FILE, "build/ICG_ext_lib" or die 'could not open build/ICG_ext_lib' ; - my @unfiltered_ext_lib_files = ; - close FILE ; - chomp @unfiltered_ext_lib_files ; - - foreach my $e ( @unfiltered_ext_lib_files ) { - $e = abs_path(dirname($e)) . "/" . basename($e) ; - if ( exists $compiler_file_list{$e} ) { - push @ext_lib_files , $e ; - } - } - + @ext_lib_files = sort keys %ext_libs ; + @files_to_process = sort keys %files ; } -sub make_swig_makefile() { +sub write_makefile_swig_deps() { + open DEPENDENCIES_FILE , ">build/Makefile_swig_deps" or return ; + print DEPENDENCIES_FILE "build/Makefile_swig: \\\n" ; + foreach my $file ( @files_to_process, @ext_lib_files ) { + print DEPENDENCIES_FILE " " . $file . " \\\n" ; + } +} + +sub has_swig_no($) { + my %trick_header = extract_trick_header( $_[0], do { local( @ARGV, $/ ) = $_[0] ; <> }, 0, 0 ) ; + my $result = $trick_header{swig} =~ /^NO$/i ; + print "SWIG Skip SWIG: (NO): $_[0]\n" if $verbose_build and $result ; + return $result ; +} + +sub purge_swig_no_files() { + @files_to_process = grep { !has_swig_no($_) } @files_to_process ; + @ext_lib_files = grep { !has_swig_no($_) } @ext_lib_files ; +} + +sub write_makefile_swig() { my ($n , $f , $k , $m); my %temp_hash ; my ($ii) ; my ($swig_sim_dir, $swig_src_dir) ; my (%py_module_map) ; - - my $s_source_full_path = abs_path("S_source.hh") ; - my $s_source_md5 = md5_hex($s_source_full_path) ; + my $s_source_md5 = md5_hex(abs_path("S_source.hh")) ; $swig_sim_dir = "trick" ; $swig_src_dir = "build" ; - foreach $n (@files_to_process) { - $f = abs_path(dirname($n)) . "/" . basename($n) ; - my ($continue) = 1 ; - foreach my $ie ( @swig_exclude_dirs ) { - # if file location begins with $ie (a SWIG exclude dir) - if ( $f =~ /^\Q$ie/ ) { - print "CP(swig) skipping $f (SWIG exclude dir $ie)\n" ; - $continue = 0 ; - last ; # break out of loop - } - } - next if ( $continue == 0 ) ; - $temp_hash{$f} = 1; - } - @files_to_process = sort keys %temp_hash ; - open MAKEFILE , ">build/Makefile_swig" or return ; open PY_LINK_LIST , ">build/py_link_list" or return ; print PY_LINK_LIST "build/init_swig_modules.o\n" ; @@ -221,13 +211,13 @@ build/top.i: build/CP_instances SWIG_SRC = \$(subst .i,.cpp,\$(SWIG_I)) $swig_src_dir/top.cpp -\$(SWIG_SRC) : %.cpp: %.i | \$(SWIG_I) +\$(SWIG_SRC) : %.cpp: %.i %.d | \$(SWIG_I) \t\$(PRINT_SWIG) \t\$(ECHO_CMD)\$(SWIG) \$(TRICK_INCLUDE) \$(TRICK_DEFINES) \$(TRICK_VERSIONS) \$(SWIG_FLAGS) -c++ -python -includeall -ignoremissing -w201,303,325,362,389,401,451 -MMD -MP -outdir trick -o \$@ \$< -\$(SWIG_OBJECTS:.o=.d): ; +\$(SWIG_SRC:.cpp=.d): ; --include \$(SWIG_OBJECTS:.o=.d) +-include \$(SWIG_SRC:.cpp=.d) # SWIG_OBJECTS ================================================================= @@ -300,14 +290,11 @@ LINK_LISTS += \$(LD_FILELIST)build/py_link_list print INITSWIGFILE "#include \n" ; print INITSWIGFILE "#if PY_VERSION_HEX >= 0x03000000\n" ; print INITSWIGFILE "extern \"C\" {\n\n" ; - foreach $f ( @files_to_process ) { - my $md5_sum = md5_hex($f) ; - print INITSWIGFILE "PyObject * PyInit__m${md5_sum}(void) ; /* $f */\n" ; - } - foreach $f ( @ext_lib_files ) { - my $md5_sum = md5_hex($f) ; - print INITSWIGFILE "PyObject * PyInit__m${md5_sum}(void) ; /* $f */\n" ; + + foreach $f ( @files_to_process, @ext_lib_files ) { + print INITSWIGFILE "PyObject * PyInit__m$md5s{$f}(void) ; /* $f */\n" ; } + print INITSWIGFILE "PyObject * PyInit__sim_services(void) ;\n" ; print INITSWIGFILE "PyObject * PyInit__top(void) ;\n" ; print INITSWIGFILE "PyObject * PyInit__swig_double(void) ;\n" ; @@ -315,17 +302,11 @@ LINK_LISTS += \$(LD_FILELIST)build/py_link_list print INITSWIGFILE "PyObject * PyInit__swig_ref(void) ;\n" ; print INITSWIGFILE "\nvoid init_swig_modules(void) {\n\n" ; - foreach $f ( @files_to_process ) { + foreach $f ( @files_to_process, @ext_lib_files ) { next if ( $f =~ /S_source.hh/ ) ; - my $md5_sum = md5_hex($f) ; - print INITSWIGFILE " PyImport_AppendInittab(\"_m${md5_sum}\", PyInit__m${md5_sum}) ;\n" ; - } - foreach $f ( @ext_lib_files ) { - my $md5_sum = md5_hex($f) ; - print INITSWIGFILE " PyImport_AppendInittab(\"_m${md5_sum}\", PyInit__m${md5_sum}) ;\n" ; + print INITSWIGFILE " PyImport_AppendInittab(\"_m$md5s{$f}\", PyInit__m$md5s{$f}) ;\n" ; } print INITSWIGFILE " PyImport_AppendInittab(\"_m${s_source_md5}\", PyInit__m${s_source_md5}) ;\n" ; - print INITSWIGFILE " PyImport_AppendInittab(\"_sim_services\", PyInit__sim_services) ;\n" ; print INITSWIGFILE " PyImport_AppendInittab(\"_top\", PyInit__top) ;\n" ; print INITSWIGFILE " PyImport_AppendInittab(\"_swig_double\", PyInit__swig_double) ;\n" ; @@ -335,14 +316,11 @@ LINK_LISTS += \$(LD_FILELIST)build/py_link_list print INITSWIGFILE "#else\n" ; print INITSWIGFILE "extern \"C\" {\n\n" ; - foreach $f ( @files_to_process ) { - my $md5_sum = md5_hex($f) ; - print INITSWIGFILE "void init_m${md5_sum}(void) ; /* $f */\n" ; - } - foreach $f ( @ext_lib_files ) { - my $md5_sum = md5_hex($f) ; - print INITSWIGFILE "void init_m${md5_sum}(void) ; /* $f */\n" ; + + foreach $f ( @files_to_process, @ext_lib_files ) { + print INITSWIGFILE "void init_m$md5s{$f}(void) ; /* $f */\n" ; } + print INITSWIGFILE "void init_sim_services(void) ;\n" ; print INITSWIGFILE "void init_top(void) ;\n" ; print INITSWIGFILE "void init_swig_double(void) ;\n" ; @@ -350,17 +328,11 @@ LINK_LISTS += \$(LD_FILELIST)build/py_link_list print INITSWIGFILE "void init_swig_ref(void) ;\n" ; print INITSWIGFILE "\nvoid init_swig_modules(void) {\n\n" ; - foreach $f ( @files_to_process ) { + foreach $f ( @files_to_process, @ext_lib_files) { next if ( $f =~ /S_source.hh/ ) ; - my $md5_sum = md5_hex($f) ; - print INITSWIGFILE " init_m${md5_sum}() ;\n" ; - } - foreach $f ( @ext_lib_files ) { - my $md5_sum = md5_hex($f) ; - print INITSWIGFILE " init_m${md5_sum}() ;\n" ; + print INITSWIGFILE " init_m$md5s{$f}() ;\n" ; } print INITSWIGFILE " init_m${s_source_md5}() ;\n" ; - print INITSWIGFILE " init_sim_services() ;\n" ; print INITSWIGFILE " init_top() ;\n" ; print INITSWIGFILE " init_swig_double() ;\n" ; @@ -415,10 +387,9 @@ LINK_LISTS += \$(LD_FILELIST)build/py_link_list } foreach $f ( @ext_lib_files ) { - my $md5_sum = md5_hex($f) ; print INITFILE "# $f\n" ; - print INITFILE "import _m${md5_sum}\n" ; - print INITFILE "from m${md5_sum} import *\n" ; + print INITFILE "import _m$md5s{$f}\n" ; + print INITFILE "from m$md5s{$f} import *\n" ; print INITFILE "combine_cvars(all_cvars, cvar)\n" ; print INITFILE "cvar = None\n\n" ; } @@ -458,13 +429,20 @@ LINK_LISTS += \$(LD_FILELIST)build/py_link_list while ( $temp_str =~ s/\/.*?$// ) { open INITFILE , ">trick/$temp_str/__init__.py" or return ; - close INITFILE ; + close initfile ; } } return ; } -get_exclude_dirs() ; +@exclude_paths = get_paths( "TRICK_EXCLUDE" ) ; +@swig_exclude_paths = get_paths( "TRICK_SWIG_EXCLUDE" ) ; +@ext_lib_paths = get_paths( "TRICK_EXT_LIB_DIRS" ) ; read_files_to_process() ; -make_swig_makefile() ; +write_makefile_swig_deps() ; + +# Remove SWIG: (NO) files, but not before they're written to the dependency file. +# If SWIG: (NO) is removed, Makefile_swig needs to be regenerated. +purge_swig_no_files() ; +write_makefile_swig() ; diff --git a/libexec/trick/pm/html.pm b/libexec/trick/pm/html.pm index 36cabedc..b4e5f326 100644 --- a/libexec/trick/pm/html.pm +++ b/libexec/trick/pm/html.pm @@ -29,23 +29,25 @@ sub extract_trick_header($$$$) { $header{libdep} = $2 if $trick_header =~ /LIBRARY[ _]DEPENDENC(Y|IES):[^(]*(.*?)\)([A-Z _\t\n\r]+:|[ \t\n\r]*$)/si ; $header{iodep} = $2 if $trick_header =~ /IO DEPENDENC(Y|IES):[^(]*(.*?)\)([A-Z _\t\n\r]+:|[ \t\n\r]*$)/si ; $header{icg_ignore} = $2 if $trick_header =~ /ICG[ _]IGNORE[ _]TYPE(S)?:[^(]*(.*?)\)([A-Z _\t\n\r]+:|[ \t\n\r]*$)/si ; + $header{swig} = $1 if $trick_header =~ /SWIG:[^(]*\((.*?)\)([A-Z _\t\n\r]+:|[ \t\n\r]*$)/si ; $header{default_data} = $1 if $trick_header =~ /DEFAULT[ _]DATA:[^(]*(.*?)\)([A-Z _\t\n\r]+:|[ \t\n\r]*$)/si ; $header{python_module} = $1 if $trick_header =~ /PYTHON[ _]MODULE:[^(]*(.*?)\)([A-Z _\t\n\r]+:|[ \t\n\r]*$)/si ; $header{programmers} = $1 if $trick_header =~ /PROGRAMMERS:[^(]*(.*?)\)([A-Z _\t\n\r]+:|[ \t\n\r]*$)/si ; $header{language} = $1 if $trick_header =~ /LANGUAGE:[^(]*(.*?)\)([A-Z _\t\n\r]+:|[ \t\n\r]*$)/si ; - # if ( $verbose ) { - # print " "x$indent , "/*\n" ; - # print " "x($indent+3) , "DOC TITLE:\n\t$header{doc_title})\n" if ( exists $header{doc_title} ) ; - # print " "x($indent+3) , "PURPOSE:\n\t$header{purpose})\n" if ( exists $header{purpose} ) ; - # print " "x($indent+3) , "REFERENCE:\n\t$header{reference})\n" if ( exists $header{reference} ) ; - # print " "x($indent+3) , "ASSUMPTIONS AND LIMITATIONS:\n\t$header{assump})\n" if ( exists $header{assump} ) ; - # print " "x($indent+3) , "CLASS:\n\t$header{class})\n" if ( exists $header{class} ) ; - # print " "x($indent+3) , "LIBRARY DEPENDENCIES:\n\t$header{libdep})\n" if ( exists $header{libdep} ) ; - # print " "x($indent+3) , "PROGRAMMERS:\n\t$header{program})\n" if ( exists $header{program} ) ; - # print " "x($indent+3) , "LANGUAGE:\n\t$header{language})\n" if ( exists $header{language} ) ; - # print " "x$indent , "*/\n\n" ; - # } + if ( $verbose ) { + print " "x$indent , "/*\n" ; + print " "x($indent+3) , "DOC TITLE:\n\t$header{doc_title})\n" if ( exists $header{doc_title} ) ; + print " "x($indent+3) , "PURPOSE:\n\t$header{purpose})\n" if ( exists $header{purpose} ) ; + print " "x($indent+3) , "REFERENCE:\n\t$header{reference})\n" if ( exists $header{reference} ) ; + print " "x($indent+3) , "ASSUMPTIONS AND LIMITATIONS:\n\t$header{assump})\n" if ( exists $header{assump} ) ; + print " "x($indent+3) , "CLASS:\n\t$header{class})\n" if ( exists $header{class} ) ; + print " "x($indent+3) , "LIBRARY DEPENDENCIES:\n\t$header{libdep})\n" if ( exists $header{libdep} ) ; + print " "x($indent+3) , "SWIG:\n\t($header{swig})\n" if ( exists $header{swig} ) ; + print " "x($indent+3) , "PROGRAMMERS:\n\t$header{program})\n" if ( exists $header{program} ) ; + print " "x($indent+3) , "LANGUAGE:\n\t$header{language})\n" if ( exists $header{language} ) ; + print " "x$indent , "*/\n\n" ; + } if ( $contents =~ /(?:@|\\)trick_li(?:nk|b)_dependency\s*{\s*(.*?)\s*}/) { my @lib_list ; diff --git a/share/trick/makefiles/trickify.mk b/share/trick/makefiles/trickify.mk index 6ff79144..1e68201d 100644 --- a/share/trick/makefiles/trickify.mk +++ b/share/trick/makefiles/trickify.mk @@ -126,9 +126,9 @@ $(SWIG_OBJECTS): %.o: %.cpp $(info $(call COLOR,Compiling) $<) @$(TRICK_CPPC) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) $(PYTHON_INCLUDES) -Wno-unused-parameter -Wno-shadow -c -o $@ $< -$(SWIG_OBJECTS:.o=.cpp): %.cpp: %.i %.d | $(TRICKIFY_PYTHON_DIR) +$(SWIG_OBJECTS:.o=.cpp): %.cpp: %.i %.d | $(TRICKIFY_PYTHON_DIR) $(SWIG_OBJECTS:.o=.i) $(info $(call COLOR,SWIGing) $<) - @$(SWIG) $(TRICK_INCLUDE) $(TRICK_DEFINES) $(TRICK_VERSIONS) $(SWIG_FLAGS) -c++ -python -includeall -w201,303,325,362,389,401,451 -MMD -MP -outdir $(TRICKIFY_PYTHON_DIR) -o $@ $< + @$(SWIG) $(TRICK_INCLUDE) $(TRICK_DEFINES) $(TRICK_VERSIONS) $(SWIG_FLAGS) -c++ -python -includeall -ignoremissing -w201,303,325,362,389,401,451 -MMD -MP -outdir $(TRICKIFY_PYTHON_DIR) -o $@ $< $(SWIG_OBJECTS:.o=.d): ; diff --git a/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp b/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp index dbc652b5..fa75adf6 100644 --- a/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp +++ b/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp @@ -161,7 +161,7 @@ void HeaderSearchDirs::AddDirsAndFiles(std::string env_var, std::vector