summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: