ENH: add OPTIONAL keyword to ENABLE_LANGUAGE, so it will be possible to do

something like this:

ENABLE_LANGUAGE(ASM-ATT)
IF(CMAKE_ASM-ATT_COMPILER_WORKS)
  ... do assembler stufff
ELSE(CMAKE_ASM-ATT_COMPILER_WORKS)
  ... fallback to generic C/C++
ENDIF(CMAKE_ASM-ATT_COMPILER_WORKS)

Alex
This commit is contained in:
Alexander Neundorf
2007-06-28 09:09:26 -04:00
parent 53f39ad566
commit 43de8c8628
28 changed files with 77 additions and 42 deletions

View File

@@ -63,11 +63,13 @@ public:
virtual const char* GetFullDocumentation()
{
return
" ENABLE_LANGUAGE(languageName)\n"
" ENABLE_LANGUAGE(languageName [OPTIONAL] )\n"
"This command enables support for the named language in CMake. "
"This is the same as the project command but does not create "
"any of the extra varaibles that are created by the project command. "
"Example languages are CXX, C, Fortran.";
"Example languages are CXX, C, Fortran.\n"
"If OPTIONAL is used, use the CMAKE_<languageName>_COMPILER_WORKS "
"variable to check whether the language has been enabled successfully.";
}
cmTypeMacro(cmEnableLanguageCommand, cmCommand);