author | llornkcor <llornkcor> | 2003-07-10 02:40:10 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-07-10 02:40:10 (UTC) |
commit | 155d68c1e7d7dc0fed2534ac43d6d77ce2781f55 (patch) (unidiff) | |
tree | e6edaa5a7040fe6c224c3943d1094dcf02e4f74c /qmake/generators/win32/msvc_objectmodel.cpp | |
parent | 86703e8a5527ef114facd02c005b6b3a7e62e263 (diff) | |
download | opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.zip opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.gz opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.bz2 |
update qmake to 1.05a
Diffstat (limited to 'qmake/generators/win32/msvc_objectmodel.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 243 |
1 files changed, 140 insertions, 103 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index c2b9e30..7ffe4f7 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp | |||
@@ -256,23 +256,23 @@ struct TPair { | |||
256 | TPair( const char* n, const triState v ) : name(n), value(v) {}; | 256 | TPair( const char* n, const triState v ) : name(n), value(v) {}; |
257 | const char* name; | 257 | const char* name; |
258 | const triState value; | 258 | const triState value; |
259 | }; | 259 | }; |
260 | struct EPair { | 260 | struct EPair { |
261 | EPair( const char* n, const int v ) : name(n), value(v) {}; | 261 | EPair( const char* n, const int v ) : name(n), value(v) {}; |
262 | const char* name; | 262 | const char* name; |
263 | const int value; | 263 | const int value; |
264 | }; | 264 | }; |
265 | struct LPair { | 265 | struct LPair { |
266 | LPair( const char* n, const long v ) : name(n), value(v) {}; | 266 | LPair( const char* n, const long v ) : name(n), value(v) {}; |
267 | const char* name; | 267 | const char* name; |
268 | const long value; | 268 | const long value; |
269 | }; | 269 | }; |
270 | struct SPair { | 270 | struct SPair { |
271 | SPair( const char* n, const QString& v ) : name(n), value(v) {}; | 271 | SPair( const char* n, const QString& v ) : name(n), value(v) {}; |
272 | const char* name; | 272 | const char* name; |
273 | const QString& value; | 273 | const QString& value; |
274 | }; | 274 | }; |
275 | struct XPair { | 275 | struct XPair { |
276 | XPair( const char* n, const QStringList& v, const char* s = "," ) : name(n), value(v), sep(s) {}; | 276 | XPair( const char* n, const QStringList& v, const char* s = "," ) : name(n), value(v), sep(s) {}; |
277 | const char* name; | 277 | const char* name; |
278 | const QStringList& value; | 278 | const QStringList& value; |
@@ -385,3 +385,3 @@ QTextStream &operator<<( QTextStream &strm, const VCCLCompilerTool &tool ) | |||
385 | strm << XPair( _AdditionalIncludeDirectories, tool.AdditionalIncludeDirectories ); | 385 | strm << XPair( _AdditionalIncludeDirectories, tool.AdditionalIncludeDirectories ); |
386 | strm << XPair( _AdditionalOptions, tool.AdditionalOptions ); | 386 | strm << XPair( _AdditionalOptions, tool.AdditionalOptions, " " ); |
387 | strm << XPair( _AdditionalUsingDirectories, tool.AdditionalUsingDirectories ); | 387 | strm << XPair( _AdditionalUsingDirectories, tool.AdditionalUsingDirectories ); |
@@ -444,3 +444,3 @@ QTextStream &operator<<( QTextStream &strm, const VCCLCompilerTool &tool ) | |||
444 | strm << EPair( _WarningLevel, tool.WarningLevel ); | 444 | strm << EPair( _WarningLevel, tool.WarningLevel ); |
445 | strm << TPair( _WholeProgramOptimization, tool.WholeProgramOptimization ); | 445 | strm << TPair( _WholeProgramOptimization, tool.WholeProgramOptimization ); |
446 | strm << "/>"; | 446 | strm << "/>"; |
@@ -452,3 +452,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
452 | // skip index 0 ('/' or '-') | 452 | // skip index 0 ('/' or '-') |
453 | char first = option[1]; | 453 | char first = option[1]; |
454 | char second = option[2]; | 454 | char second = option[2]; |
@@ -456,2 +456,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
456 | char fourth = option[4]; | 456 | char fourth = option[4]; |
457 | bool found = TRUE; | ||
457 | 458 | ||
@@ -461,13 +462,16 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
461 | qWarning( "Generator: Option '/?', '/help': MSVC.NET projects do not support outputting help info" ); | 462 | qWarning( "Generator: Option '/?', '/help': MSVC.NET projects do not support outputting help info" ); |
462 | return FALSE; | 463 | found = FALSE; |
464 | break; | ||
463 | case '@': | 465 | case '@': |
464 | qWarning( "Generator: Option '/@': MSVC.NET projects do not support the use of a response file" ); | 466 | qWarning( "Generator: Option '/@': MSVC.NET projects do not support the use of a response file" ); |
465 | return FALSE; | 467 | found = FALSE; |
468 | break; | ||
466 | case 'l': | 469 | case 'l': |
467 | qWarning( "Generator: Option '/link': qmake generator does not support passing link options through the compiler tool" ); | 470 | qWarning( "Generator: Option '/link': qmake generator does not support passing link options through the compiler tool" ); |
468 | return FALSE; | 471 | found = FALSE; |
469 | 472 | break; | |
470 | case 'A': | 473 | case 'A': |
471 | if ( second != 'I' ) | 474 | if ( second != 'I' ) { |
472 | return FALSE; | 475 | found = FALSE; break; |
476 | } | ||
473 | AdditionalUsingDirectories += option+2; | 477 | AdditionalUsingDirectories += option+2; |
@@ -489,3 +493,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
489 | } | 493 | } |
490 | return FALSE; | 494 | found = FALSE; break; |
491 | } | 495 | } |
@@ -546,3 +550,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
546 | default: | 550 | default: |
547 | return FALSE; | 551 | found = FALSE; break; |
548 | } | 552 | } |
@@ -555,3 +559,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
555 | qWarning( "Option '/G3' and '/G4' were phased out in Visual C++ 5.0" ); | 559 | qWarning( "Option '/G3' and '/G4' were phased out in Visual C++ 5.0" ); |
556 | return FALSE; | 560 | found = FALSE; break; |
557 | case '5': | 561 | case '5': |
@@ -621,3 +625,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
621 | default: | 625 | default: |
622 | return FALSE; | 626 | found = FALSE; break; |
623 | } | 627 | } |
@@ -635,3 +639,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
635 | } | 639 | } |
636 | return FALSE; | 640 | found = FALSE; break; |
637 | case 'M': | 641 | case 'M': |
@@ -653,3 +657,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
653 | } | 657 | } |
654 | return FALSE; | 658 | found = FALSE; break; |
655 | case 'O': | 659 | case 'O': |
@@ -673,3 +677,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
673 | else | 677 | else |
674 | return FALSE; | 678 | found = FALSE; |
675 | break; | 679 | break; |
@@ -707,3 +711,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
707 | default: | 711 | default: |
708 | return FALSE; | 712 | found = FALSE; break; |
709 | } | 713 | } |
@@ -718,3 +722,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
718 | } | 722 | } |
719 | return FALSE; | 723 | found = FALSE; break; |
720 | case 'R': | 724 | case 'R': |
@@ -730,3 +734,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
730 | else | 734 | else |
731 | return FALSE; | 735 | found = FALSE; break; |
732 | } | 736 | } |
@@ -740,3 +744,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
740 | qWarning( "Generator: Options '/Tp<filename>' and '/Tc<filename>' are not supported by qmake" ); | 744 | qWarning( "Generator: Options '/Tp<filename>' and '/Tc<filename>' are not supported by qmake" ); |
741 | return FALSE; | 745 | found = FALSE; break; |
742 | } | 746 | } |
@@ -780,3 +784,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
780 | default: | 784 | default: |
781 | return FALSE; | 785 | found = FALSE; break; |
782 | } | 786 | } |
@@ -809,3 +813,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
809 | default: | 813 | default: |
810 | return FALSE; | 814 | found = FALSE; break; |
811 | } | 815 | } |
@@ -842,5 +846,5 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
842 | else | 846 | else |
843 | return FALSE; | 847 | found = FALSE; |
844 | } else { | 848 | } else { |
845 | return FALSE; | 849 | found = FALSE; break; |
846 | } | 850 | } |
@@ -871,3 +875,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
871 | default: | 875 | default: |
872 | return FALSE; | 876 | found = FALSE; break; |
873 | } | 877 | } |
@@ -875,3 +879,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
875 | default: | 879 | default: |
876 | return FALSE; | 880 | found = FALSE; break; |
877 | } | 881 | } |
@@ -889,3 +893,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
889 | } else { | 893 | } else { |
890 | return FALSE; | 894 | found = FALSE; break; |
891 | } | 895 | } |
@@ -893,4 +897,5 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
893 | case 'd': | 897 | case 'd': |
894 | if ( second != 'r' ) | 898 | if ( second != 'r' ) { |
895 | return FALSE; | 899 | found = FALSE; break; |
900 | } | ||
896 | CompileAsManaged = managedAssembly; | 901 | CompileAsManaged = managedAssembly; |
@@ -906,3 +911,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
906 | } | 911 | } |
907 | return FALSE; | 912 | found = FALSE; break; |
908 | case 's': | 913 | case 's': |
@@ -912,3 +917,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
912 | } | 917 | } |
913 | return FALSE; | 918 | found = FALSE; break; |
914 | case 'u': | 919 | case 'u': |
@@ -921,3 +926,3 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
921 | } | 926 | } |
922 | return FALSE; | 927 | found = FALSE; break; |
923 | case 'w': | 928 | case 'w': |
@@ -935,4 +940,6 @@ bool VCCLCompilerTool::parseOption( const char* option ) | |||
935 | default: | 940 | default: |
936 | return FALSE; | 941 | found = FALSE; break; |
937 | } | 942 | } |
943 | if( !found ) | ||
944 | warn_msg( WarnLogic, "Could not parse Compiler option: %s", option ); | ||
938 | return TRUE; | 945 | return TRUE; |
@@ -982,3 +989,3 @@ QTextStream &operator<<( QTextStream &strm, const VCLinkerTool &tool ) | |||
982 | strm << XPair( _AdditionalLibraryDirectories, tool.AdditionalLibraryDirectories ); | 989 | strm << XPair( _AdditionalLibraryDirectories, tool.AdditionalLibraryDirectories ); |
983 | strm << XPair( _AdditionalOptions, tool.AdditionalOptions ); | 990 | strm << XPair( _AdditionalOptions, tool.AdditionalOptions, " " ); |
984 | strm << XPair( _AddModuleNamesToAssembly, tool.AddModuleNamesToAssembly ); | 991 | strm << XPair( _AddModuleNamesToAssembly, tool.AddModuleNamesToAssembly ); |
@@ -1048,4 +1055,4 @@ static uint elfHash( const char* name ) | |||
1048 | k = (const uchar *) name; | 1055 | k = (const uchar *) name; |
1049 | while ( (*k) && | 1056 | while ( (*k) && |
1050 | (*k)!= ':' && | 1057 | (*k)!= ':' && |
1051 | (*k)!=',' && | 1058 | (*k)!=',' && |
@@ -1062,2 +1069,5 @@ static uint elfHash( const char* name ) | |||
1062 | } | 1069 | } |
1070 | |||
1071 | //#define USE_DISPLAY_HASH | ||
1072 | #ifdef USE_DISPLAY_HASH | ||
1063 | static void displayHash( const char* str ) | 1073 | static void displayHash( const char* str ) |
@@ -1066,2 +1076,3 @@ static void displayHash( const char* str ) | |||
1066 | } | 1076 | } |
1077 | #endif | ||
1067 | 1078 | ||
@@ -1069,34 +1080,34 @@ bool VCLinkerTool::parseOption( const char* option ) | |||
1069 | { | 1080 | { |
1070 | #if 0 | 1081 | #ifdef USE_DISPLAY_HASH |
1071 | // Main options | 1082 | // Main options |
1072 | displayHash( "/ALIGN" ); displayHash( "/ALLOWBIND" ); displayHash( "/ASSEMBLYMODULE" ); | 1083 | displayHash( "/ALIGN" ); displayHash( "/ALLOWBIND" ); displayHash( "/ASSEMBLYMODULE" ); |
1073 | displayHash( "/ASSEMBLYRESOURCE" ); displayHash( "/BASE" ); displayHash( "/DEBUG" ); | 1084 | displayHash( "/ASSEMBLYRESOURCE" ); displayHash( "/BASE" ); displayHash( "/DEBUG" ); |
1074 | displayHash( "/DEF" ); displayHash( "/DEFAULTLIB" ); displayHash( "/DELAY" ); | 1085 | displayHash( "/DEF" ); displayHash( "/DEFAULTLIB" ); displayHash( "/DELAY" ); |
1075 | displayHash( "/DELAYLOAD" ); displayHash( "/DLL" ); displayHash( "/DRIVER" ); | 1086 | displayHash( "/DELAYLOAD" ); displayHash( "/DLL" ); displayHash( "/DRIVER" ); |
1076 | displayHash( "/ENTRY" ); displayHash( "/EXETYPE" ); displayHash( "/EXPORT" ); | 1087 | displayHash( "/ENTRY" ); displayHash( "/EXETYPE" ); displayHash( "/EXPORT" ); |
1077 | displayHash( "/FIXED" ); displayHash( "/FORCE" ); displayHash( "/HEAP" ); | 1088 | displayHash( "/FIXED" ); displayHash( "/FORCE" ); displayHash( "/HEAP" ); |
1078 | displayHash( "/IDLOUT" ); displayHash( "/IGNOREIDL" ); displayHash( "/IMPLIB" ); | 1089 | displayHash( "/IDLOUT" ); displayHash( "/IGNOREIDL" ); displayHash( "/IMPLIB" ); |
1079 | displayHash( "/INCLUDE" ); displayHash( "/INCREMENTAL" ); displayHash( "/LARGEADDRESSAWARE" ); | 1090 | displayHash( "/INCLUDE" ); displayHash( "/INCREMENTAL" ); displayHash( "/LARGEADDRESSAWARE" ); |
1080 | displayHash( "/LIBPATH" ); displayHash( "/LTCG" ); displayHash( "/MACHINE" ); | 1091 | displayHash( "/LIBPATH" ); displayHash( "/LTCG" ); displayHash( "/MACHINE" ); |
1081 | displayHash( "/MAP" ); displayHash( "/MAPINFO" ); displayHash( "/MERGE" ); | 1092 | displayHash( "/MAP" ); displayHash( "/MAPINFO" ); displayHash( "/MERGE" ); |
1082 | displayHash( "/MIDL" ); displayHash( "/NOASSEMBLY" ); displayHash( "/NODEFAULTLIB" ); | 1093 | displayHash( "/MIDL" ); displayHash( "/NOASSEMBLY" ); displayHash( "/NODEFAULTLIB" ); |
1083 | displayHash( "/NOENTRY" ); displayHash( "/NOLOGO" ); displayHash( "/OPT" ); | 1094 | displayHash( "/NOENTRY" ); displayHash( "/NOLOGO" ); displayHash( "/OPT" ); |
1084 | displayHash( "/ORDER" ); displayHash( "/OUT" ); displayHash( "/PDB" ); | 1095 | displayHash( "/ORDER" ); displayHash( "/OUT" ); displayHash( "/PDB" ); |
1085 | displayHash( "/PDBSTRIPPED" ); displayHash( "/RELEASE" ); displayHash( "/SECTION" ); | 1096 | displayHash( "/PDBSTRIPPED" ); displayHash( "/RELEASE" ); displayHash( "/SECTION" ); |
1086 | displayHash( "/STACK" ); displayHash( "/STUB" ); displayHash( "/SUBSYSTEM" ); | 1097 | displayHash( "/STACK" ); displayHash( "/STUB" ); displayHash( "/SUBSYSTEM" ); |
1087 | displayHash( "/SWAPRUN" ); displayHash( "/TLBID" ); displayHash( "/TLBOUT" ); | 1098 | displayHash( "/SWAPRUN" ); displayHash( "/TLBID" ); displayHash( "/TLBOUT" ); |
1088 | displayHash( "/TSAWARE" ); displayHash( "/VERBOSE" ); displayHash( "/VERSION" ); | 1099 | displayHash( "/TSAWARE" ); displayHash( "/VERBOSE" ); displayHash( "/VERSION" ); |
1089 | displayHash( "/VXD" ); displayHash( "/WS " ); | 1100 | displayHash( "/VXD" ); displayHash( "/WS " ); |
1090 | #endif | 1101 | #endif |
1091 | #if 0 | 1102 | #ifdef USE_DISPLAY_HASH |
1092 | // Sub options | 1103 | // Sub options |
1093 | displayHash( "UNLOAD" ); displayHash( "NOBIND" ); displayHash( "no" ); displayHash( "NOSTATUS" ); displayHash( "STATUS" ); | 1104 | displayHash( "UNLOAD" ); displayHash( "NOBIND" ); displayHash( "no" ); displayHash( "NOSTATUS" ); displayHash( "STATUS" ); |
1094 | displayHash( "AM33" ); displayHash( "ARM" ); displayHash( "CEE" ); displayHash( "IA64" ); displayHash( "X86" ); displayHash( "M32R" ); | 1105 | displayHash( "AM33" ); displayHash( "ARM" ); displayHash( "CEE" ); displayHash( "IA64" ); displayHash( "X86" ); displayHash( "M32R" ); |
1095 | displayHash( "MIPS" ); displayHash( "MIPS16" ); displayHash( "MIPSFPU" ); displayHash( "MIPSFPU16" ); displayHash( "MIPSR41XX" ); displayHash( "PPC" ); | 1106 | displayHash( "MIPS" ); displayHash( "MIPS16" ); displayHash( "MIPSFPU" ); displayHash( "MIPSFPU16" ); displayHash( "MIPSR41XX" ); displayHash( "PPC" ); |
1096 | displayHash( "SH3" ); displayHash( "SH4" ); displayHash( "SH5" ); displayHash( "THUMB" ); displayHash( "TRICORE" ); displayHash( "EXPORTS" ); | 1107 | displayHash( "SH3" ); displayHash( "SH4" ); displayHash( "SH5" ); displayHash( "THUMB" ); displayHash( "TRICORE" ); displayHash( "EXPORTS" ); |
1097 | displayHash( "LINES" ); displayHash( "REF" ); displayHash( "NOREF" ); displayHash( "ICF" ); displayHash( "WIN98" ); displayHash( "NOWIN98" ); | 1108 | displayHash( "LINES" ); displayHash( "REF" ); displayHash( "NOREF" ); displayHash( "ICF" ); displayHash( "WIN98" ); displayHash( "NOWIN98" ); |
1098 | displayHash( "CONSOLE" ); displayHash( "EFI_APPLICATION" ); displayHash( "EFI_BOOT_SERVICE_DRIVER" ); displayHash( "EFI_ROM" ); displayHash( "EFI_RUNTIME_DRIVER" ); displayHash( "NATIVE" ); | 1109 | displayHash( "CONSOLE" ); displayHash( "EFI_APPLICATION" ); displayHash( "EFI_BOOT_SERVICE_DRIVER" ); displayHash( "EFI_ROM" ); displayHash( "EFI_RUNTIME_DRIVER" ); displayHash( "NATIVE" ); |
1099 | displayHash( "POSIX" ); displayHash( "WINDOWS" ); displayHash( "WINDOWSCE" ); displayHash( "NET" ); displayHash( "CD" ); displayHash( "NO" ); | 1110 | displayHash( "POSIX" ); displayHash( "WINDOWS" ); displayHash( "WINDOWSCE" ); displayHash( "NET" ); displayHash( "CD" ); displayHash( "NO" ); |
1100 | #endif | 1111 | #endif |
1101 | 1112 | bool found = TRUE; | |
1102 | switch ( elfHash(option) ) { | 1113 | switch ( elfHash(option) ) { |
@@ -1143,3 +1154,3 @@ bool VCLinkerTool::parseOption( const char* option ) | |||
1143 | // case 0x003390c: // /DLL | 1154 | // case 0x003390c: // /DLL |
1144 | // This option is not used for vcproj files | 1155 | // This option is not used for vcproj files |
1145 | //break; | 1156 | //break; |
@@ -1194,3 +1205,3 @@ bool VCLinkerTool::parseOption( const char* option ) | |||
1194 | switch ( elfHash(option+9) ) { | 1205 | switch ( elfHash(option+9) ) { |
1195 | // Very limited documentation on all options but X86, | 1206 | // Very limited documentation on all options but X86, |
1196 | // so we put the others in AdditionalOptions... | 1207 | // so we put the others in AdditionalOptions... |
@@ -1218,3 +1229,3 @@ bool VCLinkerTool::parseOption( const char* option ) | |||
1218 | default: | 1229 | default: |
1219 | return FALSE; | 1230 | found = FALSE; |
1220 | } | 1231 | } |
@@ -1277,3 +1288,3 @@ bool VCLinkerTool::parseOption( const char* option ) | |||
1277 | default: | 1288 | default: |
1278 | return FALSE; | 1289 | found = FALSE; |
1279 | } | 1290 | } |
@@ -1326,3 +1337,3 @@ bool VCLinkerTool::parseOption( const char* option ) | |||
1326 | default: | 1337 | default: |
1327 | return FALSE; | 1338 | found = FALSE; |
1328 | } | 1339 | } |
@@ -1336,3 +1347,3 @@ bool VCLinkerTool::parseOption( const char* option ) | |||
1336 | else | 1347 | else |
1337 | return FALSE; | 1348 | found = FALSE; |
1338 | break; | 1349 | break; |
@@ -1362,5 +1373,7 @@ bool VCLinkerTool::parseOption( const char* option ) | |||
1362 | default: | 1373 | default: |
1363 | return FALSE; | 1374 | found = FALSE; |
1364 | } | 1375 | } |
1365 | return TRUE; | 1376 | if( !found ) |
1377 | warn_msg( WarnLogic, "Could not parse Linker options: %s", option ); | ||
1378 | return found; | ||
1366 | } | 1379 | } |
@@ -1394,3 +1407,3 @@ QTextStream &operator<<( QTextStream &strm, const VCMIDLTool &tool ) | |||
1394 | strm << XPair( _AdditionalIncludeDirectories, tool.AdditionalIncludeDirectories ); | 1407 | strm << XPair( _AdditionalIncludeDirectories, tool.AdditionalIncludeDirectories ); |
1395 | strm << XPair( _AdditionalOptions, tool.AdditionalOptions ); | 1408 | strm << XPair( _AdditionalOptions, tool.AdditionalOptions, " " ); |
1396 | strm << XPair( _CPreprocessOptions, tool.CPreprocessOptions ); | 1409 | strm << XPair( _CPreprocessOptions, tool.CPreprocessOptions ); |
@@ -1429,3 +1442,3 @@ bool VCMIDLTool::parseOption( const char* option ) | |||
1429 | { | 1442 | { |
1430 | #if 0 | 1443 | #ifdef USE_DISPLAY_HASH |
1431 | displayHash( "/D name[=def]" ); displayHash( "/I directory-list" ); displayHash( "/Oi" ); | 1444 | displayHash( "/D name[=def]" ); displayHash( "/I directory-list" ); displayHash( "/Oi" ); |
@@ -1437,3 +1450,3 @@ bool VCMIDLTool::parseOption( const char* option ) | |||
1437 | displayHash( "/client none" ); displayHash( "/client stub" ); displayHash( "/confirm" ); | 1450 | displayHash( "/client none" ); displayHash( "/client stub" ); displayHash( "/confirm" ); |
1438 | displayHash( "/cpp_cmd cmd_line" ); displayHash( "/cpp_opt options" ); | 1451 | displayHash( "/cpp_cmd cmd_line" ); displayHash( "/cpp_opt options" ); |
1439 | displayHash( "/cstub filename" ); displayHash( "/dlldata filename" ); displayHash( "/env win32" ); | 1452 | displayHash( "/cstub filename" ); displayHash( "/dlldata filename" ); displayHash( "/env win32" ); |
@@ -1447,3 +1460,3 @@ bool VCMIDLTool::parseOption( const char* option ) | |||
1447 | displayHash( "/no_warn" ); displayHash( "/nocpp" ); displayHash( "/nologo" ); displayHash( "/notlb" ); | 1460 | displayHash( "/no_warn" ); displayHash( "/nocpp" ); displayHash( "/nologo" ); displayHash( "/notlb" ); |
1448 | displayHash( "/o filename" ); displayHash( "/oldnames" ); displayHash( "/oldtlb" ); | 1461 | displayHash( "/o filename" ); displayHash( "/oldnames" ); displayHash( "/oldtlb" ); |
1449 | displayHash( "/osf" ); displayHash( "/out directory" ); displayHash( "/pack {N}" ); | 1462 | displayHash( "/osf" ); displayHash( "/out directory" ); displayHash( "/pack {N}" ); |
@@ -1457,2 +1470,3 @@ bool VCMIDLTool::parseOption( const char* option ) | |||
1457 | #endif | 1470 | #endif |
1471 | bool found = TRUE; | ||
1458 | int offset = 0; | 1472 | int offset = 0; |
@@ -1492,3 +1506,3 @@ bool VCMIDLTool::parseOption( const char* option ) | |||
1492 | default: | 1506 | default: |
1493 | return FALSE; | 1507 | found = FALSE; |
1494 | } | 1508 | } |
@@ -1507,3 +1521,3 @@ bool VCMIDLTool::parseOption( const char* option ) | |||
1507 | default: | 1521 | default: |
1508 | return FALSE; | 1522 | found = FALSE; |
1509 | } | 1523 | } |
@@ -1538,9 +1552,9 @@ bool VCMIDLTool::parseOption( const char* option ) | |||
1538 | case 'r': | 1552 | case 'r': |
1539 | break; | ||
1540 | ErrorCheckRefPointers = _True; | 1553 | ErrorCheckRefPointers = _True; |
1541 | case 's': | ||
1542 | break; | 1554 | break; |
1555 | case 's': | ||
1543 | ErrorCheckStubData = _True; | 1556 | ErrorCheckStubData = _True; |
1557 | break; | ||
1544 | default: | 1558 | default: |
1545 | return FALSE; | 1559 | found = FALSE; |
1546 | } | 1560 | } |
@@ -1649,3 +1663,3 @@ bool VCMIDLTool::parseOption( const char* option ) | |||
1649 | default: | 1663 | default: |
1650 | return FALSE; | 1664 | found = FALSE; |
1651 | } | 1665 | } |
@@ -1654,2 +1668,4 @@ bool VCMIDLTool::parseOption( const char* option ) | |||
1654 | } | 1668 | } |
1669 | if( !found ) | ||
1670 | warn_msg( WarnLogic, "Could not parse MIDL option: %s", option ); | ||
1655 | return TRUE; | 1671 | return TRUE; |
@@ -1670,3 +1686,3 @@ QTextStream &operator<<( QTextStream &strm, const VCLibrarianTool &tool ) | |||
1670 | strm << XPair( _AdditionalLibraryDirectories, tool.AdditionalLibraryDirectories ); | 1686 | strm << XPair( _AdditionalLibraryDirectories, tool.AdditionalLibraryDirectories ); |
1671 | strm << XPair( _AdditionalOptions, tool.AdditionalOptions ); | 1687 | strm << XPair( _AdditionalOptions, tool.AdditionalOptions, " " ); |
1672 | strm << XPair( _ExportNamedFunctions, tool.ExportNamedFunctions ); | 1688 | strm << XPair( _ExportNamedFunctions, tool.ExportNamedFunctions ); |
@@ -1716,3 +1732,3 @@ QTextStream &operator<<( QTextStream &strm, const VCResourceCompilerTool &tool ) | |||
1716 | strm << XPair( _AdditionalIncludeDirectories, tool.AdditionalIncludeDirectories ); | 1732 | strm << XPair( _AdditionalIncludeDirectories, tool.AdditionalIncludeDirectories ); |
1717 | strm << XPair( _AdditionalOptions, tool.AdditionalOptions ); | 1733 | strm << XPair( _AdditionalOptions, tool.AdditionalOptions, " " ); |
1718 | if ( tool.Culture != rcUseDefault ) strm << EPair( _Culture, tool.Culture ); | 1734 | if ( tool.Culture != rcUseDefault ) strm << EPair( _Culture, tool.Culture ); |
@@ -1853,9 +1869,30 @@ void VCFilter::generateUIC( QTextStream &strm, const QString& str ) const | |||
1853 | QString mocDir = Project->var( "MOC_DIR" ); | 1869 | QString mocDir = Project->var( "MOC_DIR" ); |
1870 | QString uiDir = Project->var( "UI_DIR" ); | ||
1871 | QString uiHeaders; | ||
1872 | QString uiSources; | ||
1873 | |||
1874 | // Determining the paths for the output files. | ||
1875 | int slash = str.findRev( '\\' ); | ||
1876 | QString pname = ( slash != -1 ) ? str.left( slash+1 ) : QString( ".\\" ); | ||
1877 | if( !uiDir.isEmpty() ) { | ||
1878 | uiHeaders = uiDir; | ||
1879 | uiSources = uiDir; | ||
1880 | } else { | ||
1881 | uiHeaders = Project->var( "UI_HEADERS_DIR" ); | ||
1882 | uiSources = Project->var( "UI_SOURCES_DIR" ); | ||
1883 | if( uiHeaders.isEmpty() ) | ||
1884 | uiHeaders = pname; | ||
1885 | if( uiSources.isEmpty() ) | ||
1886 | uiSources = pname; | ||
1887 | } | ||
1888 | if( !uiHeaders.endsWith( "\\" ) ) | ||
1889 | uiHeaders += "\\"; | ||
1890 | if( !uiSources.endsWith( "\\" ) ) | ||
1891 | uiSources += "\\"; | ||
1892 | |||
1893 | // Determine the file name. | ||
1854 | int dot = fname.findRev( '.' ); | 1894 | int dot = fname.findRev( '.' ); |
1855 | if( dot != -1 ) | 1895 | if( dot != -1 ) |
1856 | fname.truncate( dot ); | 1896 | fname.truncate( dot ); |
1857 | 1897 | ||
1858 | int slash = str.findRev( '\\' ); | ||
1859 | QString pname = ( slash != -1 ) ? str.left( slash+1 ) : QString(".\\"); | ||
1860 | |||
1861 | strm << _begFileConfiguration; | 1898 | strm << _begFileConfiguration; |
@@ -1869,5 +1906,5 @@ void VCFilter::generateUIC( QTextStream &strm, const QString& str ) const | |||
1869 | strm << _CommandLine6; | 1906 | strm << _CommandLine6; |
1870 | strm << uicApp << " " << str << " -o " << pname << fname << ".h && "; // Create .h from .ui file | 1907 | strm << uicApp << " " << str << " -o " << uiHeaders << fname << ".h && "; // Create .h from .ui file |
1871 | strm << uicApp << " " << str << " -i " << fname << ".h -o " << pname << fname << ".cpp && ";// Create .cpp from .ui file | 1908 | strm << uicApp << " " << str << " -i " << fname << ".h -o " << uiSources << fname << ".cpp && ";// Create .cpp from .ui file |
1872 | strm << mocApp << " " << pname << fname << ".h -o " << mocDir << "moc_" << fname << ".cpp\""; | 1909 | strm << mocApp << " " << uiHeaders << fname << ".h -o " << mocDir << "moc_" << fname << ".cpp\""; |
1873 | strm << _AdditionalDependencies6; | 1910 | strm << _AdditionalDependencies6; |
@@ -1875,3 +1912,3 @@ void VCFilter::generateUIC( QTextStream &strm, const QString& str ) const | |||
1875 | strm << _Outputs6; | 1912 | strm << _Outputs6; |
1876 | strm << pname << fname << ".h;" << pname << fname << ".cpp;" << mocDir << "moc_" << fname << ".cpp\""; | 1913 | strm << uiHeaders << fname << ".h;" << uiSources << fname << ".cpp;" << mocDir << "moc_" << fname << ".cpp\""; |
1877 | strm << "/>"; | 1914 | strm << "/>"; |
@@ -1908,5 +1945,5 @@ VCProject::VCProject() | |||
1908 | { | 1945 | { |
1909 | QUuid uniqueId; | ||
1910 | #if defined(Q_WS_WIN32) | 1946 | #if defined(Q_WS_WIN32) |
1911 | GUID guid; | 1947 | GUID guid; |
1948 | QUuid uniqueId; | ||
1912 | HRESULT h = CoCreateGuid( &guid ); | 1949 | HRESULT h = CoCreateGuid( &guid ); |