[CMake] enable_language(.... OPTIONAL) signature does not work correctly
Alexander Neundorf
a.neundorf-work at gmx.net
Mon Jun 29 16:48:09 EDT 2009
On Monday 29 June 2009, Alan W. Irwin wrote:
> I have been testing the OPTIONAL signature for enable_language using the
> following simple CMakeLists.txt file:
>
> *******
> cmake_minimum_required(VERSION 2.6.4)
> project(test NONE)
> enable_language(C OPTIONAL)
> message(STATUS "CMAKE_C_COMPILER_WORKS = ${CMAKE_C_COMPILER_WORKS}")
> *******
>
> According to the documentation the OPTIONAL signature is to help
> CMake-based build systems deal smoothly with bad/broken compilers by
> allowing them to take their own actions to deal with the compiler issue
> based on the value of CMAKE_<languageName>_COMPILER_WORKS. However, the
> OPTIONAL signature does not work and bad/broken compilers error out before
> the above message command can be reached. The same issue also occurs for
> C++ and Fortran.
Yes, please report this in the bug tracker.
Right now this mainly works for the assembler support.
Alex
More information about the CMake
mailing list