Hello,
Now I am working on the port of Cpputest to OpenWrt BB. I have wrote a simple Makefile as
include $(TOPDIR)/rules.mk
PKG_NAME:=cpputest
PKG_VERSION:=3.7.x
PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/cpputest/cpputest.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=4e10635b0eb877f3a346f6b84daa88b8ec0842df
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/cpputest
SECTION:=utils
CATEGORY:=Utilities
TITLE:=CppUTest is a C /C++ based unit xUnit test framework.
DEPENDS:=
ABI_VERSION:=$(PKG_RELEASE)
endef
define Package/cpputest/description
CppUTest is a C /C++ based unit xUnit test framework for unit testing and for test-driving your code. It is written in C++ but is used in C and C++ projects and frequently used in embedded systems but it works for any C/C++ project.
endef
define Package/cpputest/install
endef
$(eval $(call BuildPackage,cpputest))
and try to compile it. Unfortunately I get error and warning message as
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp: In member function 'virtual void IEEE754ExceptionsPlugin::preTestAction(UtestShell&, TestResult&)':
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:48:60: error: 'FE_ALL_EXCEPT' was not declared in this scope
CHECK(!feclearexcept(FE_ALL_EXCEPT));
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:48:73: error: 'feclearexcept' was not declared in this scope
CHECK(!feclearexcept(FE_ALL_EXCEPT));
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp: In member function 'virtual void IEEE754ExceptionsPlugin::postTestAction(UtestShell&, TestResult&)':
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:54:36: error: 'FE_DIVBYZERO' was not declared in this scope
IEEE754_CHECK_CLEAR(test, result, FE_DIVBYZERO);
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:55:36: error: 'FE_OVERFLOW' was not declared in this scope
IEEE754_CHECK_CLEAR(test, result, FE_OVERFLOW);
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:56:36: error: 'FE_UNDERFLOW' was not declared in this scope
IEEE754_CHECK_CLEAR(test, result, FE_UNDERFLOW);
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:57:36: error: 'FE_INVALID' was not declared in this scope
IEEE754_CHECK_CLEAR(test, result, FE_INVALID);
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:58:36: error: 'FE_INEXACT' was not declared in this scope
IEEE754_CHECK_CLEAR(test, result, FE_INEXACT);
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp: In member function 'void IEEE754ExceptionsPlugin::ieee754Check(UtestShell&, TestResult&, int, const char*)':
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:75:81: error: 'FE_INEXACT' was not declared in this scope
if(inexactDisabled_) CHECK(!feclearexcept(FE_INEXACT));
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:75:91: error: 'feclearexcept' was not declared in this scope
if(inexactDisabled_) CHECK(!feclearexcept(FE_INEXACT));
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:76:25: error: 'fetestexcept' was not declared in this scope
if(fetestexcept(flag)) {
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:77:64: error: 'FE_ALL_EXCEPT' was not declared in this scope
CHECK(!feclearexcept(FE_ALL_EXCEPT));
^
src/CppUTestExt/IEEE754ExceptionsPlugin.cpp:77:77: error: 'feclearexcept' was not declared in this scope
CHECK(!feclearexcept(FE_ALL_EXCEPT));
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-weak-vtables" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-exit-time-destructors" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-global-constructors" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-keyword-macro" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-reserved-id-macro" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-disabled-macro-expansion" [enabled by default]
My hardware and software environment
Clearfog A1 Rev 2.1 with Armada 388
OpenWRT BB from https://github.com/MarvellEmbeddedProcessors/openwrt-bb
Could someone give me some suggestions ? Thanks.