[CMake] RE: CMake 2.4.1/VC71 Why the wierd <project>.dir subdirs?

Trevor Kellaway tkellaway at asl-electronics.co.uk
Thu May 10 17:25:17 EDT 2007


Bill,

> It should work like this:
> 
> add_executable(foo foo.cxx)
> get_target_property(objs foo OBJECT_FILES)
> message(${objs})

Thanks, I was mistakenly calling it before the ADD_LIBRARY /
ADD_EXECUTABLE.

However, this has exposed a bug/issue, my list of dependencies includes
some custom commands, one of which has a non-standard language extension
".lint", this is causing a crash here:

cmTarget.cxx line 1252 in cmTarget::ComputeObjectFiles()

      cmSourceFile* sf = *s;
      const char* lang = this->Makefile->GetLocalGenerator()->
        GetGlobalGenerator()->
        GetLanguageFromExtension(sf->GetSourceExtension().c_str());
L1252:  std::string lookupObj = objExtensionLookup1 + lang;

lang is 0x00000000, as the extension lookup has failed.

Would you like me to raise a bug report for this?

 - TrevK



More information about the CMake mailing list