Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -d option to mob cmake to build in debug mode. #137

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/cmd/cmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,17 @@ namespace mob {
(clipp::option("--install-prefix") & clipp::value("PATH") >> prefix_) %
"sets CMAKE_INSTALL_PREFIX [default: empty]",

(clipp::option("-d", "--debug").set(debug_, true)) %
"whether to configure for debug mode [default: false]",

(clipp::value("PATH") >> path_) % "path from which to run `cmake`");
}

int cmake_command::do_run()
{
auto t = tasks::modorganizer::create_cmake_tool(fs::path(utf8_to_utf16(path_)));
auto t = tasks::modorganizer::create_cmake_tool(
fs::path(utf8_to_utf16(path_)), mob::cmake::generate,
debug_ ? config::debug : config::relwithdebinfo);

t.generator(gen_);
t.cmd(cmd_);
Expand Down
3 changes: 2 additions & 1 deletion src/cmd/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ namespace mob {
private:
std::string gen_;
std::string cmd_;
bool x64_ = true;
bool x64_ = true;
bool debug_ = false;
std::string prefix_;
std::string path_;
};
Expand Down
Loading