Changeset 521
- Timestamp:
- Sep 17, 2009, 5:31:10 PM (15 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r520 r521 1 2009-09-17 <rybkin@lal.in2p3.fr> 408 2 3 * source/cmt.h: Declare function Cmt::configure_devenv_tag 4 * source/cmt_parser.cxx: Implement Cmt::configure_devenv_tag making 5 use of command specified by macro "devenv_command" to retrieve version 6 of Microsoft (R) Visual Studio and define a corresponding tag 7 * mgr/requirements: For Windows, set macro devenv_command to "devenv /?" 8 (can be overridden via CMTHOME requirements file) 9 * mgr/VisualC.nmake: Update 10 1 11 2009-09-10 <rybkin@lal.in2p3.fr> 407 2 12 -
CMT/HEAD/mgr/VisualC.nmake
r497 r521 14 14 msdevdll=/dll 15 15 msdevdllflags=/MT /D "_USRDLL" /D "WDLL_EXPORTS" 16 ppcmd=/I16 devenv_command=devenv /? 17 17 preproc=cl.exe 18 18 cpp=cl.exe -
CMT/HEAD/mgr/requirements
r520 r521 207 207 VC7debug "0" 208 208 209 macro devenv_command "" \ 210 WIN32 "devenv /?" \ 209 211 210 212 # -
CMT/HEAD/source/cmt.h
r459 r521 99 99 static void configure_tags (Use* use); 100 100 static void configure_uname_tag (); 101 static void configure_devenv_tag (); 101 102 static void configure_version_tag (); 102 103 // static void configure_cmt_message (); -
CMT/HEAD/source/cmt_parser.cxx
r516 r521 1314 1314 1315 1315 tag = Tag::add (uname, PriorityUname, "uname", 0); 1316 tag->mark (); 1317 } 1318 } 1319 1320 //---------------------------------------------------------- 1321 void Cmt::configure_devenv_tag () 1322 { 1323 cmt_string devenv_command; 1324 Symbol* devenv_command_macro = Symbol::find ("devenv_command"); 1325 if (0 == devenv_command_macro) return; 1326 1327 devenv_command = devenv_command_macro->resolve_macro_value (); 1328 if (devenv_command == "") return; 1329 devenv_command += " 2>&1"; 1330 1331 cmt_string output; 1332 if (0 != CmtSystem::execute (devenv_command, output)) return; 1333 cmt_string devenv; 1334 int pos; 1335 pos = output.find ("Microsoft"); 1336 if (pos != cmt_string::npos) devenv = "vs"; 1337 else return; 1338 1339 // 1340 // Make the output as one single big line. 1341 // 1342 1343 output.replace_all ("\n", " "); 1344 output.replace_all ("\r", " "); 1345 1346 CmtSystem::cmt_string_vector words; 1347 CmtSystem::split (output, " \t", words); 1348 1349 cmt_string version; 1350 bool need_version (false); 1351 for (int i = 0; i < words.size (); i++) 1352 { 1353 if (need_version && words[i] != "") 1354 { 1355 version = words[i]; 1356 break; 1357 } 1358 if (words[i] == "Version") 1359 need_version = true; 1360 } 1361 1362 if (version == "") 1363 { 1364 devenv += "00"; 1365 } 1366 else 1367 { 1368 CmtSystem::cmt_string_vector nbrs; 1369 CmtSystem::split (version, ".", nbrs); 1370 if (1 == nbrs.size ()) 1371 devenv += nbrs[0]; 1372 else 1373 devenv += nbrs[0] + nbrs[1]; 1374 } 1375 1376 if (devenv != "") 1377 { 1378 Tag* tag; 1379 1380 tag = Tag::add (devenv, PriorityUname, "devenv", 0); 1316 1381 tag->mark (); 1317 1382 } … … 5604 5669 5605 5670 use_home_requirements (); 5671 5672 configure_devenv_tag (); 5606 5673 5607 5674 break;
Note: See TracChangeset
for help on using the changeset viewer.