[cmake-developers] Documentation for CMAKE_*_FLAGS_* not homogenous

Eric Noulard eric.noulard at gmail.com
Mon Nov 12 02:08:09 EST 2012


HI there,

While reading the builtin doc for
CMAKE_<LANG>_FLAGS_<BUILD_TYPE>
answering a questoin I was surprise by the fact that the documentation for
the CMAKE_*_FLAGS_*  variable is not very homogenous.

We currently have:
CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS_[CMAKE_BUILD_TYPE]
CMAKE_<LANG>_FLAGS_DEBUG
CMAKE_<LANG>_FLAGS_MINSIZEREL
CMAKE_<LANG>_FLAGS_RELEASE
CMAKE_<LANG>_FLAGS_RELWITHDEBINFO


Is there any reason we have
CMAKE_<LANG>_FLAGS_DEBUG
CMAKE_<LANG>_FLAGS_MINSIZEREL
CMAKE_<LANG>_FLAGS_RELEASE
CMAKE_<LANG>_FLAGS_RELWITHDEBINFO

instead of:
CMAKE_<LANG>_FLAGS_<CMAKE_BUILD_TYPE>

and why do we get:
CMAKE_EXE_LINKER_FLAGS_[CMAKE_BUILD_TYPE]

and not:
CMAKE_EXE_LINKER_FLAGS_<CMAKE_BUILD_TYPE>

then what is the relationship between
CMAKE_EXE_LINKER_FLAGS
and
CMAKE_EXE_LINKER_FLAGS_<CMAKE_BUILD_TYPE>

the builtin doc says nothing about it?

Last but not least we do not have documentation for
CMAKE_<LANG>_FLAGS

even if it is used by many bits of *.cmake files
and that Wiki
http://www.cmake.org/Wiki/CMake_Useful_Variables
says:
None (CMAKE_C_FLAGS or CMAKE_CXX_FLAGS used)

I think the documentations of all those vars may be improved:

1) use homogeneous naming
2) improve doc content and in particular explain their
    links and reference appropriate properties

       COMPILE_FLAGS
       COMPILE_DEFINITIONS
       COMPILE_DEFINITIONS_<CONFIG>

     note again here that we have "<CONFIG>" and not
     "<CMAKE_BUILD_TYPE>"

I can work on a patch proposal but before doing that I'd like to
collect feedback/opinion.
Moreover if some of you want to fix that before I thikn about it go ahead :-]


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org



More information about the cmake-developers mailing list