diff options
author | David Robillard <d@drobilla.net> | 2012-08-09 02:34:39 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-09 02:34:39 +0000 |
commit | f08ab45ec226e01e4e6a77ced66e30176b30e5cd (patch) | |
tree | 5e15910e61bbf129825e67d73613af68229c537a | |
parent | 70777f188c86c6a4167906cd0146373eed360940 (diff) | |
download | sord-f08ab45ec226e01e4e6a77ced66e30176b30e5cd.tar.gz sord-f08ab45ec226e01e4e6a77ced66e30176b30e5cd.tar.bz2 sord-f08ab45ec226e01e4e6a77ced66e30176b30e5cd.zip |
Compile when a C++ compiler is not present.
git-svn-id: http://svn.drobilla.net/sord/trunk@247 3d64ff67-21c5-427c-a301-fe4f08042e5a
-rw-r--r-- | wscript | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -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: |