2010/6/3 Alexander Neundorf <neund...@kde.org>: > On Thursday 03 June 2010, you wrote: >> 2010/6/3 Alexander Neundorf <neund...@kde.org>: >> > On Thursday 03 June 2010, Pavel Heimlich, a.k.a. hajma wrote: >> >> 2010/6/1 Alexander Neundorf <neund...@kde.org>: >> >> > Can you put something like >> >> > #warning "Here I am" >> >> > in places where it makes sense in CMakeCXXCompilerId.cpp.in and then >> >> > run cmake again in clean build trees (small hello-world like projects >> >> > should be good enough for that). >> >> >> >> Hi, compiling slightly modified CMakeCXXCompilerId.cpp.in >> >> (http://tropikhajma.sweb.cz/osol/a.cpp) yields: >> >> $ CC a.cpp >> >> "a.cpp", line 7: Warning: #warning "CMakeCXXCompilerId.cpp.in:1". >> >> "a.cpp", line 22: Warning: #warning "CMakeCXXCompilerId.cpp.in:3". >> >> "a.cpp", line 62: Warning: #warning "CMakeCXXCompilerId.cpp.in:7". >> >> "a.cpp", line 67: Warning: String literal converted to char* in >> >> initialization. "a.cpp", line 68: Warning: #warning >> >> "CMakeCXXCompilerId.cpp.in:8". 5 Warning(s) detected. >> >> $ ./a.out >> >> SunPro >> >> >> >> HTH >> > >> > Hmm, this looks good actually. >> > Could you please post the compiled a.out file ? >> >> sure. http://tropikhajma.sweb.cz/osol/a.out > > Hmm, it has the text it should have, see the attached screenshot. Very strange > that cmake doesn't find that... > >> > Do you also get the "Unknown" CXX compiler id with cmake 2.8.1 ?
yes. investigating more, I noted that SunPro is detected correctly when we do export CXX=CC in the spec or build script, but fails when we do export CXX="CC -library=no%Cstd -library=Crun -xannotate=no" It looks like cmake somehow ends up calling CC "-library=no%Cstd -library=Crun -xannotate=no" the-rest-of-the-flags-here CMakeCXXCompilerId.cpp which the Studio does not like: $ CC "-library=no%Cstd -library=Crun -xannotate=no" CMakeCXXCompilerId.cpp CC: illegal option usage -library=no%Cstd -library=Crun -xannotate=no This is the same as observed in the cmake logs below. Is this behaviour expected? P. ---------------------------------- Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. Compiler: /opt/sunstudio12.1/bin/CC Build flags: -D__EXTENSIONS__;-DSOLARIS;-D_REENTRANT;-DNDEBUG;-D__EXTENSIONS__;-D_LARGEFILE_SOURCE;-D_FILE_OFFSET_BITS=64;-D_POSIX_PTHREAD_SEMANTICS;-DSOLARIS;-DSOLARIS10;-DNO_DEBUG;-D_UNICODE;-DUNICODE;-D_RWSTD_REENTRANT;;-D_XOPEN_SOURCE=500;-D_XPG5;;-I/usr/include/stdcxx4/ansi;-I/usr/include/stdcxx4;-I/opt/kde4/include;-I/usr/include/stdcxx4/ansi;-I/usr/include/stdcxx4;-library=no%Cstd;-library=Crun;-features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic;-instances=global;-template=geninlinefuncs;-s;-xdebugformat=dwarf;-xlang=c99;-xustr=ascii_utf16_ushort;-Qoption;ccfe;-features=gcc;-Qoption;ccfe;-features=zla;-Qoption;ccfe;++boolflag:sunwcch=false;-mt;-xF=%none;-xbuiltin=%all;-xinline=%auto;-xprefetch=auto;-xprefetch_auto_type=indirect_array_access;-xprefetch_level=3;-KPIC;-DPIC;-xipo=0;-xO3;-xregs=no%frameptr;-xjobs=2;-xrestrict=%all;-xthreadvar=%all;-z;combreloc;-z;redlocsym;-z;nodefaultlib;-z;ignore;-z;now;-z;rescan;-z;absexec;-xldscope=symbolic;-xlibmil;-s;-xtarget=pentium4;-m32;-xarch=sse2;-xchip=pentium4;-xcache=8/64/4:256/128/8;-lc;-lm;-ldl;-lpthread;-lposix4;-lrt;-mt;-L/opt/kde4/lib;-R/opt/kde4/lib;-L/usr/lib;-R/usr/lib;-Y;P,/opt/kde4/lib;-i;-L/opt/kde4/lib;-R/opt/kde4/lib;-L/usr/lib;-R/usr/lib;-Bdynamic;-lstdcxx4;-lCrun;-lc;-lm;-xannotate=no Id flags: The output was: 0 "CMakeCXXCompilerId.cpp", line 76: Warning: String literal converted to char* in initialization. "CMakeCXXCompilerId.cpp", line 189: Warning: String literal converted to char* in initialization. "CMakeCXXCompilerId.cpp", line 190: Warning: String literal converted to char* in initialization. 3 Warning(s) detected. Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" ------------------------------------------------ vs ------------------------------------------------ Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /opt/sunstudio12.1/bin/CC -library=no%Cstd -library=Crun -xannotate=no Build flags: -D__EXTENSIONS__;-DSOLARIS;-D_REENTRANT;-DNDEBUG;-D__EXTENSIONS__;-D_LARGEFILE_SOURCE;-D_FILE_OFFSET_BITS=64;-D_POSIX_PTHREAD_SEMANTICS;-DSOLARIS;-DSOLARIS10;-DNO_DEBUG;-D_UNICODE;-DUNICODE;-D_RWSTD_REENTRANT;;-D_XOPEN_SOURCE=500;-D_XPG5;;-I/usr/include/stdcxx4/ansi;-I/usr/include/stdcxx4;-I/opt/kde4/include;-I/usr/include/stdcxx4/ansi;-I/usr/include/stdcxx4;-library=no%Cstd;-library=Crun;-features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic;-instances=global;-template=geninlinefuncs;-s;-xdebugformat=dwarf;-xlang=c99;-xustr=ascii_utf16_ushort;-Qoption;ccfe;-features=gcc;-Qoption;ccfe;-features=zla;-Qoption;ccfe;++boolflag:sunwcch=false;-mt;-xF=%none;-xbuiltin=%all;-xinline=%auto;-xprefetch=auto;-xprefetch_auto_type=indirect_array_access;-xprefetch_level=3;-KPIC;-DPIC;-xipo=0;-xO3;-xregs=no%frameptr;-xjobs=2;-xrestrict=%all;-xthreadvar=%all;-z;combreloc;-z;redlocsym;-z;nodefaultlib;-z;ignore;-z;now;-z;rescan;-z;absexec;-xldscope=symbolic;-xlibmil;-s;-xtarget=pentium4;-m32;-xarch=sse2;-xchip=pentium4;-xcache=8/64/4:256/128/8;-lc;-lm;-ldl;-lpthread;-lposix4;-lrt;-mt;-L/opt/kde4/lib;-R/opt/kde4/lib;-L/usr/lib;-R/usr/lib;-Y;P,/opt/kde4/lib;-i;-L/opt/kde4/lib;-R/opt/kde4/lib;-L/usr/lib;-R/usr/lib;-Bdynamic;-lstdcxx4;-lCrun;-lc;-lm;-xannotate=no Id flags: The output was: 1 CC: illegal option usage -library=no%Cstd -library=Crun -xannotate=no --------------------------------------------- _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem