Changeset 81
- Timestamp:
- Sep 1, 2005, 10:34:42 AM (19 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r80 r81 1 1 2005-09-01 Christian Arnault <arnault@lal.in2p3.fr> 276 2 2 3 * source/cmt_symbol.cxx (all_set): Generate all XXXROOT and XXXCONFIG evs accroding 3 * source/cmt_use.cxx (get_strategy): Implement the get_strategy function 4 5 * source/cmt_use.h (class Use): Install the get_strategy function as a member function. 6 7 * source/cmt_symbol.cxx (all_set): Generate all XXXROOT and XXXCONFIG evs according 4 8 to the strategies. 5 9 -
CMT/HEAD/source/cmt.h
r80 r81 211 211 static CmtScopeFilteringMode get_scope_filtering_mode (); 212 212 static bool get_all_sets_done (); 213 static bool get_strategy (const cmt_string& name, Use& use);214 213 215 214 /// If a project file exists above the current directory we don't need CMTPATH -
CMT/HEAD/source/cmt_parser.cxx
r80 r81 150 150 int m_count; 151 151 }; 152 153 154 //----------------------------------------------------------155 bool Cmt::get_strategy (const cmt_string& name, Use& use)156 {157 static cmt_string cmtpath;158 static cmt_string offset;159 160 use.get_cmtpath_and_offset (cmtpath, offset);161 162 Project* p = Project::find_by_cmtpath (cmtpath);163 164 bool strategy;165 166 if (p == 0)167 {168 static const Project::ProjectVector& projects = Project::projects ();169 170 if (projects.size () == 0) strategy = StrategyMgr::get_default_strategy (name);171 else172 {173 p = &(projects[0]);174 strategy = p->get_strategy (name);175 }176 }177 else178 {179 strategy = p->get_strategy (name);180 }181 182 return (strategy);183 }184 152 185 153 //---------------------------------------------------------- … … 1741 1709 } 1742 1710 1743 if ( get_strategy ("InstallArea", current_use))1711 if (current_use.get_strategy ("InstallArea")) 1744 1712 { 1745 1713 const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); … … 2165 2133 // Try a cleanup of the installation area 2166 2134 // 2167 if ( get_strategy ("InstallArea", current_use))2135 if (current_use.get_strategy ("InstallArea")) 2168 2136 { 2169 2137 CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); … … 2171 2139 //cout << "#IA3>" << endl; 2172 2140 2173 if ( get_strategy ("SetupCleanup", Use::current ()))2141 if (current_use.get_strategy ("SetupCleanup")) 2174 2142 { 2175 2143 ia_mgr.config (); … … 2903 2871 Symbol::expand (libname); 2904 2872 2905 if ( get_strategy ("InstallArea", current_use))2873 if (current_use.get_strategy ("InstallArea")) 2906 2874 { 2907 2875 const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); … … 3103 3071 // Try a cleanup of the installation area 3104 3072 // 3105 if ( get_strategy ("InstallArea", current_use))3073 if (current_use.get_strategy ("InstallArea")) 3106 3074 { 3107 3075 CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); … … 3112 3080 3113 3081 /* 3114 if ( get_strategy ("SetupCleanup", current_use))3082 if (current_use.get_strategy ("SetupCleanup")) 3115 3083 { 3116 3084 const cmt_string& installarea = ia_mgr.get_installarea (); … … 3679 3647 cout << "Build strategy : "; 3680 3648 3681 if ( get_strategy ("BuildPrototypes", current_use))3649 if (current_use.get_strategy ("BuildPrototypes")) 3682 3650 { 3683 3651 cout << "prototypes"; … … 3688 3656 } 3689 3657 3690 if ( get_strategy ("InstallArea", current_use))3658 if (current_use.get_strategy ("InstallArea")) 3691 3659 { 3692 3660 cout << " with_installarea"; … … 3701 3669 cout << "Setup strategy : "; 3702 3670 3703 if ( get_strategy ("SetupConfig", current_use))3671 if (current_use.get_strategy ("SetupConfig")) 3704 3672 { 3705 3673 cout << "config"; … … 3710 3678 } 3711 3679 3712 if ( get_strategy ("SetupRoot", current_use))3680 if (current_use.get_strategy ("SetupRoot")) 3713 3681 { 3714 3682 cout << " root"; … … 3719 3687 } 3720 3688 3721 if ( get_strategy ("SetupCleanup", current_use))3689 if (current_use.get_strategy ("SetupCleanup")) 3722 3690 { 3723 3691 cout << " cleanup"; … … 4180 4148 cmt_string no_cleanup_opt; 4181 4149 4182 if ( get_strategy ("SetupCleanup", current_use))4150 if (current_use.get_strategy ("SetupCleanup")) 4183 4151 { 4184 4152 no_cleanup_opt = " -no_cleanup"; … … 4374 4342 cmt_string no_cleanup_opt; 4375 4343 4376 if ( get_strategy ("SetupCleanup", current_use))4344 if (current_use.get_strategy ("SetupCleanup")) 4377 4345 { 4378 4346 no_cleanup_opt = " -no_cleanup"; … … 4713 4681 { 4714 4682 Use& current_use = Use::current (); 4715 if (get_strategy ("BuildPrototypes", current_use)) return (true); 4683 4684 if (current_use.get_strategy ("BuildPrototypes")) return (true); 4716 4685 else return (false); 4717 4686 } … … 5756 5725 cmt_string system = CmtSystem::get_cmt_config (); 5757 5726 5758 bool do_config = get_strategy ("SetupConfig", use);5759 bool do_root = get_strategy ("SetupRoot", use);5727 bool do_config = use.get_strategy ("SetupConfig"); 5728 bool do_root = use.get_strategy ("SetupRoot"); 5760 5729 5761 5730 switch (mode) … … 7304 7273 CmtPathPattern::apply_all (); 7305 7274 7306 if (Cmt::get_strategy ("InstallArea", Use::current ())) 7275 const Use& current_use = Use::current (); 7276 7277 if (current_use.get_strategy ("InstallArea")) 7307 7278 { 7308 7279 CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); … … 7438 7409 // 7439 7410 /* 7440 if ( get_strategy ("InstallArea", Use::current ()))7411 if (current_use.get_strategy ("InstallArea")) 7441 7412 { 7442 7413 CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); -
CMT/HEAD/source/cmt_symbol.cxx
r80 r81 1294 1294 if (use.get_package_name () == "cmt_standalone") continue; 1295 1295 1296 if ( Cmt::get_strategy ("SetupConfig", use))1296 if (use.get_strategy ("SetupConfig")) 1297 1297 { 1298 1298 cmt_string& temp = envs.add (); … … 1303 1303 } 1304 1304 1305 if ( Cmt::get_strategy ("SetupRoot", use))1305 if (use.get_strategy ("SetupRoot")) 1306 1306 { 1307 1307 cmt_string& temp = envs.add (); … … 1319 1319 if (use.get_package_name () != "cmt_standalone") 1320 1320 { 1321 if ( Cmt::get_strategy ("SetupConfig", use))1321 if (use.get_strategy ("SetupConfig")) 1322 1322 { 1323 1323 cmt_string& temp = envs.add (); … … 1328 1328 } 1329 1329 1330 if ( Cmt::get_strategy ("SetupRoot", use))1330 if (use.get_strategy ("SetupRoot")) 1331 1331 { 1332 1332 cmt_string& temp = envs.add (); -
CMT/HEAD/source/cmt_use.cxx
r78 r81 2876 2876 } 2877 2877 2878 //------------------------------------------------------------ 2879 bool Use::get_strategy (const cmt_string& name) const 2880 { 2881 Project* p = Project::find_by_cmtpath (real_path); 2882 2883 bool strategy; 2884 2885 if (p == 0) 2886 { 2887 static const Project::ProjectVector& projects = Project::projects (); 2888 2889 if (projects.size () == 0) strategy = StrategyMgr::get_default_strategy (name); 2890 else 2891 { 2892 p = &(projects[0]); 2893 strategy = p->get_strategy (name); 2894 } 2895 } 2896 else 2897 { 2898 strategy = p->get_strategy (name); 2899 } 2900 2901 return (strategy); 2902 } 2903 2878 2904 //---------------------------------------------------------- 2879 2905 void Use::fill_includes_macro (cmt_string& buffer) const -
CMT/HEAD/source/cmt_use.h
r11 r81 89 89 void reduce_path (cmt_string& s) const; 90 90 void get_cmtpath_and_offset (cmt_string& cmtpath, cmt_string& offset) const; 91 bool get_strategy (const cmt_string& name) const; 91 92 92 93 void fill_includes_macro (cmt_string& buffer) const;
Note: See TracChangeset
for help on using the changeset viewer.