nitc: allows other modules to append to native interface options
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 18 Feb 2012 23:27:58 +0000 (18:27 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 12 Apr 2012 19:38:15 +0000 (15:38 -0400)
By appending options from the command line instead of replacing
the existing array, tihs allows any modules to append to the same list.

This is a clean fix for problems with separate_options.nit

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/nitc.nit

index 7525f90..6a1ea05 100644 (file)
@@ -58,9 +58,9 @@ class NitCompiler
                boost = opt_boost.value
                no_cc = opt_no_cc.value
                cc_link = not opt_cc_no_link.value
-               cc_lib_paths = opt_cc_lib_paths.value
-               cc_libs = opt_cc_libs.value
-               cc_include_paths = opt_cc_include_paths.value
+               cc_lib_paths.add_all( opt_cc_lib_paths.value )
+               cc_libs.add_all( opt_cc_libs.value )
+               cc_include_paths.add_all( opt_cc_include_paths.value )
                var ext = opt_extension_prefix.value
                if ext != null then ext_prefix = ext else ext_prefix = ""
                global = opt_global.value