Commit Graph
46 Commits
Author SHA1 Message Date
Davide Pesavento 2f46d6543e Avoid deprecated Boost.Asio interfaces
Change-Id: I00d285893ff61619f49dff8a8a55d0d0e2c309a7
2023-11-10 17:40:43 -05:00
Davide Pesavento 03fdfb17a1 build: enable a few more compiler warnings
Refactor default-compiler-flags.py to reduce duplication

Change-Id: I059d4857ea6744ac791592c50d41a6ef8b8d60cc
2023-08-18 18:55:54 -04:00
Davide Pesavento 12b8aaa9f2 build: decrease level of debug information produced by default
Refs: #5279
Change-Id: I5c96d3e58d507c5ab01e0ae79348be15e078ac9a
2023-08-06 19:18:51 -04:00
Davide Pesavento fcd3e44028 build: switch to C++17
Change-Id: I92039300ce845de0312dceccb94c128229ed60c4
2023-03-10 18:44:11 -05:00
Davide Pesavento 762548b15e build: drop official support for Ubuntu 18.04 and macOS 10.15
Increase the minimum required version of clang on linux to 7.0 because
older versions fail to compile libstdc++'s implementation of std::variant

Change-Id: Id17d95c2869634622fc8775e085b74801a486e90
2023-03-07 14:40:22 -05:00
Davide Pesavento 81de5d98e9 Prepare release 0.8.1
Refs: #5250
Change-Id: I99931c1300cd752554aea764e9688d027b5de29e
2022-12-31 01:50:11 -05:00
Davide Pesavento ea5ce49651 build: link with lld if available
Change-Id: Iaf1e7110e629fa1fa16bbd8b8cc1418fafd2408b
2022-10-05 01:46:24 -04:00
Davide Pesavento f662500858 build+ci: support macOS on arm64
Refs: #5135
Change-Id: Ifac57bf18dea805dc9eab06039806858bb3b6f20
2022-08-10 20:40:52 -04:00
Davide Pesavento 541a822ae6 build: raise minimum build requirements
* Make gcc 7.4 and boost 1.65.1 hard dependencies, both are
   available out-of-the-box on Ubuntu 18.04
 * Require Xcode 10 on macOS but recommend 11.3 or later
 * If using clang on non-Apple platforms, the minimum supported
   version is now 6.0

Change-Id: I79c84a266741c9a66655da4fd467fe0d8218e8f0
2022-03-08 21:09:01 -05:00
Davide Pesavento 71c622bb68 build: require clang >= 4.0, Xcode >= 9.0
Also, recommend using gcc 7.4.0 or later, and silence
an ABI-related diagnostic message from gcc on armv7

Refs: #5087, #5106
Change-Id: I4d9841bea9df19cbb9ba3b0865949b1d66e6ec3e
2020-04-27 20:02:56 -04:00
Davide Pesavento 64ae55d781 build: ensure /usr/local/include is treated as system include path on FreeBSD
Also use the LLD linker by default on FreeBSD.

Change-Id: I42fc1b3688008e6fa40ee5f399501e54dba25a83
Refs: #4790
2018-12-26 10:03:05 -08:00
Davide Pesavento 52bc4e918c build: disable -Wmissing-braces with clang < 6.0
Also remove some -Wno-error= flags that are no longer needed.

Change-Id: I0e0ad52c69fd42b815f5b20f45311d0c9b8cdef3
Refs: #4721
2018-08-24 12:32:41 -07:00
Davide Pesavento ca660f116a build: require clang >= 3.6
3.5 fails with "error: debug information for auto is not yet supported"

Change-Id: I77ac4a064959b26796a4bf3f1dea7c3c08ea60a3
2018-06-18 08:37:00 -07:00
Davide Pesavento 1fd00240e0 build: switch to C++14
Replace our homegrown implementation of optional (based
on Boost.Optional) with optional-lite by Martin Moene.

Change-Id: I4632cbc7c705a94af0b85a335515e3430bf3cb1f
Refs: #3076
2018-05-24 21:41:56 -04:00
Davide Pesavento 844b09331b build: require gcc >= 5.3, boost >= 1.58, openssl >= 1.0.2
This effectively drops support for all versions of Ubuntu older than 16.04

Change-Id: Ie3ab7df9147e97f6467658a6399a4f9379f089c1
Refs: #4462
2018-05-08 21:00:00 -04:00
Alexander Afanasyev 5560fd40ae build: update waf to version 2.0.6
Cleanup in most build scripts

Change-Id: Ib024e95fb6f80e72b0c00e1dc8bb9300d6c5f191
2018-03-08 21:49:25 -05:00
Alexander Afanasyev b82d8c3a1b build: Add -isystem and set specialized flags as a last configuration step
This change prevents global flags from interacting with library/feature
detection scripts.

Change-Id: Ic0dba06a9afd66a810172d4a512f35f6df6b25b6
Refs: #4296
2017-09-22 12:30:57 -04:00
Davide Pesavento 88a0d816b8 Add -Wextra-semi -Wundefined-func-template to the default CXXFLAGS
And fix the resulting compilation errors.

Change-Id: I16f679836a0cf2a3ff5dfcf6f6b67bfbfe4cdbd7
Refs: #4248
2017-08-23 22:50:43 -04:00
Davide Pesavento 724d65ae2f build: explicitly require clang >= 3.4
Change-Id: I4647163a4e20a9684c698a1d94ae576cd7cb63bf
2017-06-23 17:14:08 -04:00
Davide Pesavento 37271c5b48 build: use gold linker and enable linker optimizations
On Linux, gold is more than 2x faster than traditional bfd-based ld

Change-Id: I8b1c3275b542d60e976bad05dac522ca49e921cb
2017-06-23 15:43:14 -04:00
Davide Pesavento f714c1fd88 build: use -Og with clang as well
It is supported since 4.0

Change-Id: Ib454927e4052720fa21d004f64fa4d3699e72d73
2017-04-12 23:53:40 -04:00
Davide Pesavento 7f20d6ec6c build+src: mark destructor virtual in classes with virtual functions
And to prevent similar mistakes in the future, add -Wnon-virtual-dtor
to the default build flags.

Change-Id: I28e2361341abab29fca134309288cd259736d67a
2017-01-16 14:48:06 -05:00
Alexander Afanasyev 465c973274 build: Do not fail the build in debug mode when using deprecated declarations
The original motivation of this change was to avoid compilation failure
in debug mode on macOS 10.12.

Change-Id: I032b8d98d3aaf5602e10142a4d38e0b61b24b44e
Refs: #3795
2016-10-12 09:22:46 -07:00
Davide Pesavento 1349d2d72e build: add waf-tool to simplify building with AddressSanitizer & friends
Change-Id: I368fe5bbbe3a92a7e82c22f56f6784761d94118d
Refs: #2589
2016-08-10 21:13:23 -07:00
Davide Pesavento e6e6fde5bd build: require gcc >= 4.8.2 and boost >= 1.54.0
Change-Id: I230ac74f3fd1e7912c1645f36383913ff5bd3d2c
Refs: #3599
2016-04-22 02:16:27 +02:00
Alexander Afanasyev efa22d6722 build: Do not fail build when -Winfinite-recursion warning is generated
Change-Id: I4f2a249073d050041f636b339ef0e3ba50ce9c07
Refs: #3358
2015-12-07 15:21:22 -07:00
Davide Pesavento 7c02b472c2 build: enable -Wextra by default
Also delete redundant 'return 0' from configure code snippets.

Change-Id: Ie3618db4abece6fb2d8ec8b52b88e84b4eb3a5b0
Refs: #3293
2015-11-01 20:28:48 +01:00
Junxiao Shi b1ba3e0661 build: downgrade keyword-macro from an error to a warning with clang
refs #3235

Change-Id: If687229c721d41d7a06b9014c1d9130b798bca64
2015-10-05 16:42:14 -07:00
Davide Pesavento d06ea05070 build: disable clang's unused-local-typedef warning
This commit also enables color diagnostics on release builds.

Change-Id: Ifcdadba1bc31ce64779007e7b33f8d2fee5b04b6
Refs: #3209
2015-10-02 15:25:33 -07:00
Davide Pesavento 1aafba46a9 build: Minor fix of default-compiler-flags tool
The default flags for the clang compiler included several flags that
make sense only during the debug-mode compilation.

Change-Id: I0720ff2980da81ef2978761aedda6989d8e6f38d
2015-09-17 17:24:41 -07:00
Alexander Afanasyev 0dcb6a217e build: Update waf to version 1.8.8-dev (with custom patches)
https://github.com/cawka/waf/tree/8f714a523d3b8c66f2949aaa8db91d6f7be55e55

This patch also ensures that unused-local-typedef warning does not
generate errors.

Change-Id: Ib0b2ebb745824a42770c955871b77de2f3ac0f33
Refs: #2209, #2657
2015-03-24 11:04:42 -05:00
Alexander Afanasyev 3e7d2ac0b0 build: Explicitly define _GLIBCXX_USE_NANOSLEEP if gcc < 4.8 is used
Change-Id: I2f216ba8c602d1a81433a566318a49f17728a8dd
Refs: #2499
2015-02-10 21:30:29 -08:00
Alexander Afanasyev c940f4bdc8 build: Update waf to 1.8.5-dev
This commit also fixes default debug mode flags for clang.

Change-Id: Icda2e7e66acaddff8678db260fd546295b9727ff
Refs: #2404
2015-01-22 13:45:21 -08:00
Stephen McQuistin e3d6266547 build: Fix bug in default-compiler-flags.py
Change-Id: I711df98863a5fef2472b583e40eb4480c8324016
2015-01-16 14:59:56 -08:00
Alexander Afanasyev 0151579147 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
2015-01-11 19:34:21 -08:00
Davide Pesavento dfe9c6b8c5 Always build in C++11 mode.
Change-Id: Ia25c738f63aee1b70e61f841ff52a151446ac220
Refs: #1930
2014-10-30 01:44:22 +01:00
Alexander Afanasyev 34e378c011 build: Do not warn about C99 extensions
Change-Id: Id2a612391120f0eeee9f527c633f49581afed47d
Refs: #1865
2014-08-14 19:50:34 -07:00
Alexander Afanasyev b578ab3359 build: Disable unneeded-internal-declaration warning
Change-Id: If14cd245be6e6e35023f70e6e96b71e3c05b5db6
2014-06-13 14:05:51 -07:00
Junxiao Shi 46ffa695c6 build: downgrade maybe-uninitialized from an error to a warning
maybe-uninitialized has false positives in gcc 4.8 due to Boost ticket #9134 https://svn.boost.org/trac/boost/ticket/9134

refs #1615

Change-Id: I0dc1597211a21f1b489ba9c4e10ee787aa49207c
2014-05-16 11:13:26 -07:00
Alexander Afanasyev b67090ad35 build+tests: Fixing c++11 mode compilation and correcting integrated test with faces
Change-Id: I32e34d6b2ee8cfd85ec83f62323dd7a51f2238d6
2014-04-30 16:03:27 -07:00
Alexander Afanasyev 3e6a98e9dd build: Adding -Werror during compiler flag detection phase
This way all warnings generated during the detection (e.g., `argument
unused` from clang) will not cause problems later.

Change-Id: I94bb12de70f208c8da0648dd5cff8385acec5cbc
Refs: #1539
2014-04-25 12:11:27 -07:00
Alexander Afanasyev 766cea7931 ====== Renaming library to ndn-cxx ======
Dependent applications should perform the following changes:

* all includes should be changed from <ndn-cpp-dev/...> to <ndn-cxx/...>
* documentation files/comments referring to ndn-cpp-dev should be
  updated and refer to ndn-cxx
* if the app uses pkgconfig for dependency detection, 'libndn-cpp-dev'
  should be replaced with 'libndn-cxx'.  Example for waf users:

    conf.check_cfg(package = 'libndn-cxx', args = ['--cflags', '--libs'],
                   uselib_store = 'NDN_CXX', mandatory = True)

Change-Id: I92d9ec7ff176b9fe8b4352bf04bbb32aa810422d
Refs: #1491
2014-04-24 22:49:51 -07:00
Alexander Afanasyev 1160baa78a build: Reorganizing wscript into a set smaller function-specific scripts
This commit also fixes #1401 (path to sqlite3 can be explicitly
specified and the script will try to detect sqlite3 without the use of
pkg-config)

Change-Id: Ic91ec968410705b19d2df443523026c4e0e95c6b
2014-04-10 18:58:57 -07:00
Alexander Afanasyev b78bc4d998 build: add -std=c++03 (in non C++11 mode) and -pedantic to the default CXXFLAGS
And fix the resulting warnings. The long-long-int warning is explicitly
suppressed because it's not trivial to workaround in a platform-independent
and ISO-conformant way without using C++11.

This commit also includes fix for the advisory check for C++11-enabled
compiler in common.hpp (gcc < 4.7 does not correctly define __cpluplus
macro).

Finally, when custom CXXFLAGS are specified, --with-c++11 does not force
-std=c++11 or -std=c++0x flags, but just performs mandatory checks for
std::shared_ptr and std::function.

Change-Id: Icf44627edfddd34301bd27a05882b62fcbf54329
2014-04-10 09:06:55 -07:00
Junxiao Shi 482ccc5f76 build: suppress CryptoPP warnings
Change-Id: I52e93fb18c42cf72d73c4477dc4a8093a5221215
2014-03-31 14:22:17 -07:00
Alexander Afanasyev 5e1288efa6 docs: Updated installation instructions, AUTHORs, and other small updates
Change-Id: Ide2046742254255322e8cb84279ffd6a4ecb9b4b
2014-03-29 13:11:01 -07:00