BUG: fix for bug 6172 add get source file prop LANGUAGE
This commit is contained in:
parent
872553de7e
commit
b57b1c563d
@ -49,6 +49,11 @@ bool cmGetSourceFilePropertyCommand::InitialPass(
|
|||||||
// needs to be changed to be mutable etc. for computed properties to
|
// needs to be changed to be mutable etc. for computed properties to
|
||||||
// work properly.
|
// work properly.
|
||||||
sf->GetFullPath();
|
sf->GetFullPath();
|
||||||
|
}
|
||||||
|
else if(args[2] == "LANGUAGE")
|
||||||
|
{
|
||||||
|
this->Makefile->AddDefinition(var, sf->GetLanguage());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
const char *prop = sf->GetProperty(args[2].c_str());
|
const char *prop = sf->GetProperty(args[2].c_str());
|
||||||
if (prop)
|
if (prop)
|
||||||
|
@ -12,3 +12,9 @@ if(MSVC_VERSION)
|
|||||||
endif(MSVC_VERSION)
|
endif(MSVC_VERSION)
|
||||||
string(ASCII 35 32 67 77 97 107 101 ASCII_STRING)
|
string(ASCII 35 32 67 77 97 107 101 ASCII_STRING)
|
||||||
message(STATUS "String: ${ASCII_STRING}")
|
message(STATUS "String: ${ASCII_STRING}")
|
||||||
|
get_source_file_property(LANG conly.c LANGUAGE)
|
||||||
|
if("${LANG}" STREQUAL "C")
|
||||||
|
message("Language is C")
|
||||||
|
else("${LANG}" STREQUAL "C")
|
||||||
|
message(FATAL_ERROR "Bad language for file conly.c")
|
||||||
|
endif("${LANG}" STREQUAL "C")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user