Alexander Neundorf wrote: > Hi, > > it seems the IAR C/C++ compiler for AVR cannot generate executables, but only > object files, and the linker has to be called explcitely on the generated > object files: > ftp://ftp.iar.se/WWWfiles/avr32/guides/ocavr32.pdf > > Which says: > iccavr32 myfile.c > xlink myfile.r82 -s __program_start -f lnkavr32.xcl > > Can this be made to work with the compiler ID detection in cmake via > compiling > a source file or is the only chance to use the new > CMAKE_DETERMINE_COMPILER_ID_VENDOR() function ?
It doesn't have to link. We can parse the compiler id out of object files. Look at lines in CMakeDetermineCCompiler that set CMAKE_C_COMPILER_ID_TEST_FLAGS We already try compiling with just "-c" to get an object file. Add the equivalent flag for this compiler if necessary. Basically we just try with no flag, and then with each of the flags listed in this variable. After each build we scan all files for the compiler id. If the object file is there it should work. -Brad _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake