Commit 9ed93397 authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

If you specify header file as source, it should still use C compiler and not...

If you specify header file as source, it should still use C compiler and not CXX. Also fix COnly test so that it make sure that this still works...
parent 1ba0a050
......@@ -206,7 +206,8 @@ bool cmTarget::HasCxx() const
for(std::vector<cmSourceFile*>::const_iterator i = m_SourceFiles.begin();
i != m_SourceFiles.end(); ++i)
{
if((*i)->GetSourceExtension() != "c")
if((*i)->GetSourceExtension() != "c" &&
(*i)->GetSourceExtension() != "h")
{
return true;
}
......
# a simple C only test case
PROJECT (conly C)
ADD_EXECUTABLE (conly conly.c)
ADD_EXECUTABLE (conly conly.c foo.c foo.h)
#include "foo.h"
#include <stdio.h>
int main ()
{
printf("Foo: %s\n", foo);
return 0;
}
const char* foo = "Foo";
extern const char* foo;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment