Actions
Bug #2060
closedWITH_TESTS macro names conflict with NFD
Start date:
10/13/2014
Due date:
% Done:
100%
Estimated time:
0.50 h
Description
Recently, we have added the following statement into ndn-cxx's common.hpp
#ifdef NDN_CXX_HAVE_TESTS
#define VIRTUAL_WITH_TESTS virtual
#define PUBLIC_WITH_TESTS_ELSE_PROTECTED public
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE public
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
#else
#define VIRTUAL_WITH_TESTS
#define PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE private
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE private
#endif
As a result, when ndn-cxx is compiled without tests, it prevents NFD from compiling with tests enabled.
Updated by Junxiao Shi about 10 years ago
- Description updated (diff)
- Priority changed from High to Immediate
Updated by Junxiao Shi about 10 years ago
- Subject changed from Name class for VIRTUAL_WITH_TESTS, PUBLIC_WITH_TESTS_ELSE_PROTECTED, PUBLIC_WITH_TESTS_ELSE_PRIVATE, PROTECTED_WITH_TESTS_ELSE_PRIVATE macros to WITH_TESTS macro names conflict with NFD
- Status changed from New to In Progress
- Estimated time set to 0.50 h
Confirmed.
Build command:
cd ~/ndn-cxx
./waf distclean
./waf configure --debug --without-pch
./waf
sudo ./waf install
cd ~/NFD
./waf distclean
./waf configure --with-tests --debug --without-pch
./waf
Build error:
In file included from /home/shijunxiao/NFD/core/face-uri.hpp:28:0,
from ../tools/nfd-autoreg.cpp:39:
/home/shijunxiao/NFD/common.hpp:32:0: error: "VIRTUAL_WITH_TESTS" redefined [-Werror]
/usr/local/include/ndn-cxx/common.hpp:33:0: note: this is the location of the previous definition
/home/shijunxiao/NFD/common.hpp:33:0: error: "PUBLIC_WITH_TESTS_ELSE_PROTECTED" redefined [-Werror]
/usr/local/include/ndn-cxx/common.hpp:34:0: note: this is the location of the previous definition
/home/shijunxiao/NFD/common.hpp:34:0: error: "PUBLIC_WITH_TESTS_ELSE_PRIVATE" redefined [-Werror]
/usr/local/include/ndn-cxx/common.hpp:35:0: note: this is the location of the previous definition
/home/shijunxiao/NFD/common.hpp:35:0: error: "PROTECTED_WITH_TESTS_ELSE_PRIVATE" redefined [-Werror]
/usr/local/include/ndn-cxx/common.hpp:36:0: note: this is the location of the previous definition
cc1plus: error: unrecognized command line option "-Wno-unneeded-internal-declaration" [-Werror]
cc1plus: error: unrecognized command line option "-Wno-c99-extensions" [-Werror]
cc1plus: all warnings being treated as errors
Updated by Junxiao Shi about 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
Updated by Junxiao Shi about 10 years ago
- Status changed from Code review to Closed
Actions