As Thiago mentioned, an infinitely growing command line length won?t work.  
Windows has problems and so do other platforms.
We need a scalable solution since the number of defines will grow even larger 
with a fuller PAL style solution.

I?m open to other solutions, but anything that just puts everything on the 
command line isn?t a real solution.

From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of Gregg Reynolds
Sent: Wednesday, July 6, 2016 11:33 PM
To: Thiago Macieira <thiago.macieira at intel.com>
Cc: iotivity-dev <iotivity-dev at lists.iotivity.org>
Subject: Re: [dev] New Project and maintainer in IoTivity



On Wed, Jul 6, 2016 at 11:30 PM, Thiago Macieira <thiago.macieira at 
intel.com<mailto:thiago.macieira at intel.com>> wrote:
On quarta-feira, 6 de julho de 2016 23:20:19 PDT Gregg Reynolds wrote:
> You can see one way to do this
> at https://github.com/iotk/iochibity/blob/master/site_scons/build/utils.py
> and https://github.com/iotk/iochibity/blob/master/build_common/SConscript,
> see feature_tests().  The code is not optimal but it's a start.  Here's
> what the ensuing compile command looks like:
>
> g++ -o
> out/darwin/x86_64/release/resource/c_common/ocrandom/test/linux/randomtest.
> o -c -std=c++11 -m64 -fPIC -Wall -Wextra -Wno-unused -Os -pthread
> -DHAVE_UUID -DHAVE_PTHREADS -DHAVE_GDBUS -DHAVE_GETTIMEOFDAY
> -DHAVE_STRPTIME -DHAVE_ARPA_INET_H -DHAVE_FCNTL_H -DHAVE_GRP_H
> -DHAVE_MEMORY_H -DHAVE_NETDB_H -DHAVE_NETINET_IN_H -DHAVE_PTHREAD_H
> -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_STRINGS_H -DHAVE_SYS_SOCKET_H
> -DHAVE_SYS_STAT_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TIMEB_H -DHAVE_SYS_TYPES_H
> -DHAVE_SYS_UNISTD_H -DHAVE_SYSLOG_H -DHAVE_TIME_H -DHAVE_UNISTD_H
> -DHAVE_UUID_UUID_H -DNDEBUG -D_DARWIN_C_SOURCE -DWITH_POSIX -D__darwin__
> -DIP_ADAPTER -DNO_EDR_ADAPTER -DNO_LE_ADAPTER -DROUTING_EP -DWITH_BWT
> -Iout/darwin/x86... ...
> resource/c_common/ocrandom/test/linux/randomtest.cpp

Ok, conclusion: we need a config.h.

As soon as that command-line starts to get long (say, 20 or more -D switches),
you should create a config.h and have the files include it. Remember the
command-line length limitation for Windows.

Well, that's one opinion. I personally don't have a problem with lots of -Ds 
and find that preferable to dealing with config.h. As for Windows, it seems 
unlikely to me that this would ever be a problem, and if it were to happen the 
solution IMO would be to shorten the command.

-G

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160707/742a152e/attachment.html>

Reply via email to