Skip to content

Commit

Permalink
Rename poac_output to poac-out like Zig (#671)
Browse files Browse the repository at this point in the history
Rename poac_output to poac-out like Zig
  • Loading branch information
ken-matsui authored Aug 11, 2022
1 parent cf9ac10 commit 1eb0c78
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cmake-build-debug/
.vscode/

# Poac
/poac_output
/poac-out

# Gcov
*.gcno
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ In most cases, you will want to execute a binary as well as build the project—
you:~/hello_world$ poac run
Compiling 1/1: hello_world v0.1.0 (/Users/poac/hello_world)
Finished debug target(s) in 0.90s
Running `/Users/poac/hello_world/poac_output/debug/hoge`
Running `/Users/poac/hello_world/poac-out/debug/hoge`
Hello, world!
```
Expand Down Expand Up @@ -128,7 +128,7 @@ You can now run this source code:
you:~/hello_world$ poac run
Compiling 1/1: hello_world v0.1.0 (/Users/poac/hello_world)
Finished debug target(s) in 0.50s
Running `/Users/poac/hello_world/poac_output/debug/hello_world`
Running `/Users/poac/hello_world/poac-out/debug/hello_world`
15
```

Expand Down
2 changes: 1 addition & 1 deletion include/poac/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ inline const Path src_dir(cur_dir / "src");
inline const Path include_dir(cur_dir / "include");
inline const Path tests_dir(cur_dir / "tests");
inline const Path main_cpp_file(src_dir / "main.cpp");
inline const Path output_dir(cur_dir / "poac_output");
inline const Path out_dir(cur_dir / "poac-out");

} // namespace poac::config::path

Expand Down
4 changes: 2 additions & 2 deletions lib/cmd/clean.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ clean(const Options& opts) {
}

const Path path = profile.has_value()
? config::path::output_dir / profile.value()
: config::path::output_dir;
? config::path::out_dir / profile.value()
: config::path::out_dir;

spdlog::trace("Removing ./{}", path);

Expand Down
4 changes: 2 additions & 2 deletions lib/cmd/create.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ create_template_files(const ProjectType& type, const String& package_name) {
case ProjectType::Bin:
fs::create_directories(package_name / "src"_path);
return {
{".gitignore", "/poac_output"},
{".gitignore", "/poac-out"},
{data::manifest::name, files::poac_toml(package_name)},
{"src"_path / "main.cpp", String(files::main_cpp)}};
case ProjectType::Lib:
fs::create_directories(package_name / "include"_path / package_name);
return {
{".gitignore", "/poac_output\npoac.lock"},
{".gitignore", "/poac-out\npoac.lock"},
{data::manifest::name, files::poac_toml(package_name)},
{"include"_path / package_name / (package_name + ".hpp"),
files::include_hpp(package_name)},
Expand Down
2 changes: 1 addition & 1 deletion lib/cmd/lint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ lint(StringRef name, Option<String> args) {
if (!util::verbosity::is_verbose()) {
cpplint += "--quiet ";
}
cpplint += "--exclude=poac_output/* --recursive .";
cpplint += "--exclude=poac-out/* --recursive .";

spdlog::trace("Executing `{}`", cpplint);
if (const i32 code = util::shell::Cmd(cpplint).exec_no_capture(); code != 0) {
Expand Down
4 changes: 2 additions & 2 deletions lib/core/builder/build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ start(
setenv("NINJA_STATUS", progress_status_format.c_str(), true);
StatusPrinter status(config);

const Path build_dir = config::path::output_dir / to_string(mode);
const Path build_dir = config::path::out_dir / to_string(mode);
fs::create_directories(build_dir);
Try(manifest::create(build_dir, poac_manifest, resolved_deps));

Expand Down Expand Up @@ -134,7 +134,7 @@ start(
}

Try(run(ninja_main, status));
return Ok(config::path::output_dir / to_string(mode));
return Ok(config::path::out_dir / to_string(mode));
}
return Err<GeneralError>(format(
"internal manifest still dirty after {} tries, perhaps system time is not set",
Expand Down
2 changes: 1 addition & 1 deletion lib/core/builder/manifest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ construct(
Path output_file;
if (source_file == "src"_path / "main.cpp") {
// When building src/main.cpp, the output executable should be stored at
// poac_output/debug/name
// poac-out/debug/name
output_file = build_dir / name;
} else {
output_file = (build_dir / source_file).string() + ".o";
Expand Down

0 comments on commit 1eb0c78

Please sign in to comment.