Message: previous - next
Month: January 2012

Re: [trinity-devel] cmake options

From: Bruce Dubbs <bruce.dubbs@...>
Date: Sat, 07 Jan 2012 15:15:12 -0600
Darrell Anderson wrote:

>> It might be a good idea to add a -DBUILD_AUTO flag that causes any
>> failing checks to simply disable the associated functionality as 
>> Autotools does. If you want to see this please file an enhancement
>> bug report.

> I am noticing that -DBUILD_ALL does not encompass all features. In
> several of my build scripts I have had to specify various options
> because the default is for many features to be disabled.

There are two sets of parameters:  BUILD_XXX and WITH_YYY.  The 
BUILD_ALL parameter turns on all the BUILD_XXX parameters, but doesn't 
affect the WITH_YYY parameters.

> If we enable all features by default, we end up with larger packages
> sizes, but the advantage is things breaks faster. One of the
> challenges I see in Trinity development is many developers do not
> build all packages. When a person comes along who is interested in
> building such a package, that person usually finds problems. If all
> features were enabled by default, collectively we would discover
> these problems much faster.

The defaults are not terribly important.  What I'd like to see is a 
WITH_ALL flag similar to BUILD_ALL.  I do like the idea of a BUILD_AUTO 
flag.   When a needed dependency is not found, a message like: not found.  Disabling TIFF support.

Even better would be a summary of findings at the end of the cmake 
invocation.  For instance, openssh gives the following at the end of 

OpenSSH has been configured with the following options:
                      User binaries: /usr/bin
                    System binaries: /usr/sbin
                Configuration files: /etc/ssh
                    Askpass program: /usr/lib/openssh/ssh-askpass
                       Manual pages: /usr/share/man/manX
                           PID file: /var/run
   Privilege separation chroot path: /var/lib/sshd
             sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin
                     Manpage format: doc
                        PAM support: no
                    OSF SIA support: no
                  KerberosV support: no
                    SELinux support: no
                  Smartcard support:
                      S/KEY support: no
               TCP Wrappers support: no
               MD5 password support: yes
                    libedit support: no
   Solaris process contract support: no
            Solaris project support: no
        IP address in $DISPLAY hack: no
            Translate v4 in v6 hack: yes
                   BSD Auth support: no
               Random number source: OpenSSL internal ONLY
              Privsep sandbox style: rlimit

               Host: x86_64-unknown-linux-gnu
           Compiler: gcc
     Compiler flags: -g -O2 -Wall -Wpointer-arith -Wuninitialized 
-Wsign-compare -Wformat-security -Wno-pointer-sign -Wno-unused-result 
-fno-strict-aliasing -fno-builtin-memset -fstack-protector-all
Preprocessor flags:
       Linker flags:  -fstack-protector-all
          Libraries: /usr/lib/libcrypto.a -ldl -ldl -lutil -lz -lnsl 
-lcrypt -lresolv

This tells the user exactly what is being built.  If the user wants 
something else, he has a basis to determine what is missing (or extra) 
and make the appropriate changes.

   -- Bruce