From f08ab45ec226e01e4e6a77ced66e30176b30e5cd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 9 Aug 2012 02:34:39 +0000 Subject: Compile when a C++ compiler is not present. git-svn-id: http://svn.drobilla.net/sord/trunk@247 3d64ff67-21c5-427c-a301-fe4f08042e5a --- wscript | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 7a0ca4d..226ae18 100644 --- a/wscript +++ b/wscript @@ -44,7 +44,13 @@ def options(opt): def configure(conf): conf.load('compiler_c') - conf.load('compiler_cxx') + if Options.options.build_tests: + try: + conf.load('compiler_cxx') + except: + Logs.warn("No C++ compiler, sordmm.hpp compile test skipped") + pass + autowaf.configure(conf) autowaf.set_c99_mode(conf) autowaf.display_header('Sord configuration') @@ -192,15 +198,16 @@ def build(bld): autowaf.use_lib(bld, obj, 'SERD') # C++ build test - obj = bld(features = 'cxx cxxprogram', - source = 'src/sordmm_test.cpp', - includes = ['.', './src'], - use = 'libsord_profiled', - lib = test_libs, - target = 'sordmm_test', - install_path = '', - defines = defines) - autowaf.use_lib(bld, obj, 'SERD') + if bld.env.COMPILER_CXX: + obj = bld(features = 'cxx cxxprogram', + source = 'src/sordmm_test.cpp', + includes = ['.', './src'], + use = 'libsord_profiled', + lib = test_libs, + target = 'sordmm_test', + install_path = '', + defines = defines) + autowaf.use_lib(bld, obj, 'SERD') # Utilities if bld.env.BUILD_UTILS: -- cgit v1.2.1