build: Several updates of the build scripts
- Redesign the way default compile flags are determined.
This includes a small semantical change with flag processing:
* there are now "general" compiler and link flags. These are added (if
supported) even if CXXFLAGS and/or LINKFLAGS environmental variables
are set.
* optimization/debug-mode flags that are applied only if CXXFLAGS
and/or LINKFLAGS environmental variables are not set.
- Fix define constant for sqlite3.
When pkg-config detection used, it requires `global_define` flag.
Otherwise define is applied only when the module is included in the
build target using 'use' statement.
- Remove openssl dependency
This dependency was redundant for a long time
Change-Id: Icf66fb5300954893cc2d07e022b8a0998ec894e5
Refs: #2209
diff --git a/wscript b/wscript
index ddb2cf9..45dbef1 100644
--- a/wscript
+++ b/wscript
@@ -12,7 +12,7 @@
def options(opt):
opt.load(['compiler_cxx', 'gnu_dirs', 'c_osx'])
opt.load(['default-compiler-flags', 'coverage', 'osx-security', 'pch',
- 'boost', 'openssl', 'cryptopp', 'sqlite3',
+ 'boost', 'cryptopp', 'sqlite3',
'doxygen', 'sphinx_build', 'type_traits', 'compiler-features'],
tooldir=['.waf-tools'])
@@ -39,7 +39,7 @@
def configure(conf):
conf.load(['compiler_cxx', 'gnu_dirs', 'c_osx',
'default-compiler-flags', 'osx-security', 'pch',
- 'boost', 'openssl', 'cryptopp', 'sqlite3',
+ 'boost', 'cryptopp', 'sqlite3',
'doxygen', 'sphinx_build', 'type_traits', 'compiler-features'])
conf.env['WITH_TESTS'] = conf.options.with_tests
@@ -55,7 +55,6 @@
conf.check_osx_security(mandatory=False)
- conf.check_openssl(mandatory=True)
conf.check_sqlite3(mandatory=True)
conf.check_cryptopp(mandatory=True, use='PTHREAD')
@@ -89,12 +88,6 @@
conf.write_config_header('src/ndn-cxx-config.hpp', define_prefix='NDN_CXX_')
- # disable assertions in release builds
- # This must appear after write_config_header, because otherwise all projects
- # using a ndn-cxx release build would be compiled without assertions.
- if not conf.options.debug:
- conf.define('NDEBUG', 1)
-
def build(bld):
version(bld)
@@ -121,7 +114,7 @@
source=bld.path.ant_glob('src/**/*.cpp',
excl=['src/**/*-osx.cpp', 'src/**/*-sqlite3.cpp']),
headers='src/common-pch.hpp',
- use='version BOOST OPENSSL CRYPTOPP SQLITE3 RT PIC PTHREAD',
+ use='version BOOST CRYPTOPP SQLITE3 RT PIC PTHREAD',
includes=". src",
export_includes="src",
install_path='${LIBDIR}',