On 7 January 2012 16:15, Bruce Dubbs
<bruce.dubbs@gmail.com> wrote:
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:
libtiff.so 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 configure:
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
One thing with cmake that would be good is a list of options.
All should be disabled by default, like samelian says, but there should be the option to enable all dependencies (not just -DBUILD_ALL) and a way to see what options are available.
Agreed?
Calvin morrison