File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,9 +150,10 @@ void Config::load(const yaml &root)
150150 if (!fs::exists (d))
151151 return ;
152152
153+ auto tmp = subdir;
153154 subdir = d.filename ().string ();
154155 reload (d);
155- subdir. clear () ;
156+ subdir = tmp ;
156157
157158 for (auto &[s, p] : projects)
158159 rd.known_local_packages .insert (p.pkg );
@@ -174,9 +175,10 @@ void Config::load(const yaml &root)
174175 return ;
175176 if (kv[" load_all_packages" ].IsDefined () && kv[" load_all_packages" ].as <bool >())
176177 {
178+ auto tmp = subdir;
177179 subdir = d.filename ().string ();
178180 reload (d);
179- subdir. clear () ;
181+ subdir = tmp ;
180182
181183 for (auto &[s, p] : projects)
182184 rd.known_local_packages .insert (p.pkg );
Original file line number Diff line number Diff line change @@ -1288,7 +1288,8 @@ int CMakePrinter::generate(const BuildSettings &bs) const
12881288 c.args .push_back (" -DCPPAN_HOST_C_COMPILER=" + s.host_c_compiler );
12891289 if (!s.host_cxx_compiler .empty ())
12901290 c.args .push_back (" -DCPPAN_HOST_CXX_COMPILER=" + s.host_cxx_compiler );
1291- c.args .push_back (" -DCPPAN_CROSSCOMPILATION=" s + (s.crosscompilation ? " 1" : " 0" ));
1291+ if (s.crosscompilation )
1292+ c.args .push_back (" -DCPPAN_CROSSCOMPILATION=" s + (s.crosscompilation ? " 1" : " 0" ));
12921293 if (!s.generator .empty ())
12931294 {
12941295 c.args .push_back (" -G" );
You can’t perform that action at this time.
0 commit comments