summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-09 02:34:39 +0000
committerDavid Robillard <d@drobilla.net>2012-08-09 02:34:39 +0000
commitf08ab45ec226e01e4e6a77ced66e30176b30e5cd (patch)
tree5e15910e61bbf129825e67d73613af68229c537a
parent70777f188c86c6a4167906cd0146373eed360940 (diff)
downloadsord-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--wscript27
1 files changed, 17 insertions, 10 deletions
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: