

CMake silently disregards the C preprocessor flags environment variable (2012) - nsajko
http://www.cmake.org/Bug/view.php?id=12928

======
rossy
Well, it's concerning that this is used to pass security related flags
(-D_FORTIFY_SOURCE,) and it appears to have been open since 2012. I didn't
think use of CPPFLAGS was that obscure, though I guess it has an unfortunately
confusing name.

------
miander
I think that open-source projects need to take these questions of usability
more seriously. There seems to be an unspoken but pervasive attitude that
features should not be added for convenience or to guide inexperienced users
when they make a mistake. To go on a tangent, I think this is why Linux
desktop environments still lag behind in usability; Windows and Mac chose
their fate a long time ago.

~~~
TTPrograms
The attitude I would find most helpful would be one of "sane defaults". It
should be possible for beginning users to get up and running doing things with
the most minimal amount of configuration possible. Then as the user learns
more they can replace bits of the default piecewise with config files that
only overwrite the specified attributes.

------
byuu
Why _do_ people use .cpp for files and yet CXXFLAGS for makefiles, anyway?
(also see .cc, but almost never .cxx)

~~~
quesera
CPP in CPPFLAGS means "C PreProcessor", and pre-dates C++.

This collision is why CXXFLAGS was chosen for C++ compile-time flags.

('+' being an inconvenient literal to use in a shell environment.)

The .cpp extension comes from platforms where CPPFLAGS didn't exist, i.e. not
UNIX. I think .cc has always been preferred on UNIX platforms, though .C used
to be common as well.

------
mlvljr
Sounds like smth quite in the spirit of CMake, not surprised a tiniest bit
(and not humorous either).

------
nsajko
That means most projects using CMake get built without CPPFLAGS in compiler
options.

~~~
justincormack
Which usually works, but there are some cross compiling and other options that
need it (actually largefile options on 32 bit setups that need it like glibc,
alas that hasnt died yet).

