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,10 +150,8 @@ void Config::load(const yaml &root)
150150 if (!fs::exists (d))
151151 return ;
152152
153- auto tmp = subdir;
154- subdir = d.filename ().string ();
153+ SwapAndRestore r (subdir, d.filename ().string ());
155154 reload (d);
156- subdir = tmp;
157155
158156 for (auto &[s, p] : projects)
159157 rd.known_local_packages .insert (p.pkg );
@@ -175,10 +173,8 @@ void Config::load(const yaml &root)
175173 return ;
176174 if (kv[" load_all_packages" ].IsDefined () && kv[" load_all_packages" ].as <bool >())
177175 {
178- auto tmp = subdir;
179- subdir = d.filename ().string ();
176+ SwapAndRestore r (subdir, d.filename ().string ());
180177 reload (d);
181- subdir = tmp;
182178
183179 for (auto &[s, p] : projects)
184180 rd.known_local_packages .insert (p.pkg );
Original file line number Diff line number Diff line change @@ -2168,7 +2168,8 @@ endif()
21682168
21692169 // other
21702170 ctx.increaseIndent (" target_compile_definitions (${this}" );
2171- ctx.addLine (" PRIVATE CPPAN_EXECUTABLE" );
2171+ if (d.flags [pfExecutable])
2172+ ctx.addLine (" PRIVATE CPPAN_EXECUTABLE" );
21722173 ctx.addLine (" PRIVATE ${LIBRARY_API}_EXTERN=" );
21732174 ctx.decreaseIndent (" )" );
21742175 }
You can’t perform that action at this time.
0 commit comments