if(SIZEOF_SHORT EQUAL 2)
set(YARP_INT16 "short")
else(SIZEOF_SHORT EQUAL 2)
# Hmm - there's no other native type to get 16 bits
# We will continue since most people using YARP do not need one.
message(STATUS "Warning: cannot find a 16 bit type on your system")
message(STATUS "Continuing...")
endif(SIZEOF_SHORT EQUAL 2)
YARP_INT16 is used in several parts of the code (i.e. for defining NetInt16 and NetUInt16), therefore the build will fail, for example in src/libYARP_OS/include/yarp/os/NetInt16.h
typedef YARP_INT16 NetInt16;
will become (after preprocessor)
typedef NetInt16;
that will cause an error like ‘NetInt16’ does not name a type. (There are probably several other places where something like this will happen).
Anyway, I don't know if this is a real issue and if there are platform where sizeof(short) is NOT 2, but it might be worth either fixing YARP to build without a 16 bit variable, or raising a FATAL_ERROR instead of the informative STATUS message in YarpSystemCheck.cmake
From
conf/YarpSystemCheck.cmake
from
conf/template/yarp_config_numeric.h.in
this will become
yarp/conf/numeric.h
YARP_INT16
is used in several parts of the code (i.e. for defining NetInt16 and NetUInt16), therefore the build will fail, for example insrc/libYARP_OS/include/yarp/os/NetInt16.h
will become (after preprocessor)
that will cause an error like
‘NetInt16’ does not name a type
. (There are probably several other places where something like this will happen).Anyway, I don't know if this is a real issue and if there are platform where
sizeof(short)
is NOT 2, but it might be worth either fixing YARP to build without a 16 bit variable, or raising aFATAL_ERROR
instead of the informativeSTATUS
message inYarpSystemCheck.cmake