-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
72 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#include "pch.h" | ||
|
||
#include "../core/conf.h" | ||
#include "../tasks/tasks.h" | ||
|
||
#include "commands.h" | ||
|
||
namespace mob { | ||
|
||
cmake_config_command::cmake_config_command() : command(requires_options) {} | ||
|
||
command::meta_t cmake_config_command::meta() const | ||
{ | ||
return {"cmake-config", "print CMake configuration variables"}; | ||
} | ||
|
||
clipp::group cmake_config_command::do_group() | ||
{ | ||
return clipp::group( | ||
clipp::command("cmake-config").set(picked_), | ||
(clipp::option("-h", "--help") >> help_) % ("shows this message"), | ||
clipp::command("prefix-path").set(var_, variable::prefix_path) | | ||
clipp::command("install-prefix").set(var_, variable::install_prefix)); | ||
} | ||
|
||
std::string cmake_config_command::do_doc() | ||
{ | ||
return "Print CMake variables to be used when configuring projects.\n"; | ||
} | ||
|
||
int cmake_config_command::do_run() | ||
{ | ||
switch (var_) { | ||
case variable::prefix_path: | ||
u8cerr << tasks::modorganizer::cmake_prefix_path(); | ||
break; | ||
case variable::install_prefix: | ||
u8cout << conf().path().install().string(); | ||
break; | ||
} | ||
return 0; | ||
} | ||
} // namespace mob |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters