Make WAF check for the abstract tool 'compiler_cxx', instead of manually checking for multiple compilers.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu, 17 May 2007 14:22:27 +0100
changeset 642 033f1f4891ab
parent 641 c55da3a2f496
child 644 235bb11bf5ea
Make WAF check for the abstract tool 'compiler_cxx', instead of manually checking for multiple compilers.
wscript
--- a/wscript	Thu May 17 14:31:08 2007 +0200
+++ b/wscript	Thu May 17 14:22:27 2007 +0100
@@ -71,8 +71,7 @@
 
 def set_options(opt):
     # options provided by the modules
-    if not opt.tool_options('msvc'):
-        opt.tool_options('g++')
+    opt.tool_options('compiler_cxx')
 
     opt.add_option('--enable-gcov',
                    help=('Enable code coverage analysis'),
@@ -95,9 +94,8 @@
 
 
 def configure(conf):
-    if not conf.check_tool('msvc'):
-        if not conf.check_tool('g++'):
-            Params.fatal("No suitable compiler found")
+    if not conf.check_tool('compiler_cxx'):
+        Params.fatal("No suitable compiler found")
 
 
     # create the second environment, set the variant and set its name