Skip to content

Commit

Permalink
refactor: remove not needed cxxopts
Browse files Browse the repository at this point in the history
  • Loading branch information
abdes committed Sep 21, 2022
1 parent 77d48eb commit fc5d84a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 46 deletions.
1 change: 0 additions & 1 deletion main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ target_link_libraries(
asap::common
asap::contract
asap::logging
cxxopts
glm
${META_PROJECT_NAME}::imgui
cpptoml
Expand Down
31 changes: 0 additions & 31 deletions main/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#include "config/config.h"
#include "example_application.h"

#include <cxxopts.hpp>

#include <asap_app_imgui/version.h>
#include <logging/logging.h>

Expand All @@ -28,35 +26,6 @@ auto main(int argc, char **argv) -> int {
asap::config::CreateDirectories();

try {
//
// Handle program options
//
cxxopts::Options options(cProjectName, cProjectDescription);
options.add_options()
// clang-format off
("v,version", "Show version")
("h,help", "Show usage information")
("t,test", "Test option with value", cxxopts::value<std::string>())
// clang-format on
;
auto result = options.parse(argc, argv);

if (result.count("help") != 0U) {
std::cout << options.help({}) << std::endl;
exit(0);
}

if (result.count("version") != 0U) {
std::cout << cNameVersion << std::endl;
exit(0);
}

// Test code for the option with value
if (result.count("test") != 0U) {
std::cout << "test = " << result["test"].as<std::string>() << std::endl;
}
// End Test code

ASLOG_TO_LOGGER(logger, info, "starting ImGui application...");
ExampleApplication app;
//
Expand Down
14 changes: 0 additions & 14 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,6 @@ asap_add_package(
OPTIONS
"GLM_TEST_ENABLE OFF")

# --------------------------------------------------------------------------------------------------
# cxxopts - used to parse command line arguments
# --------------------------------------------------------------------------------------------------

asap_add_package(
NAME
cxxopts
GIT_TAG
v3.0.0
GITHUB_REPOSITORY
jarro2783/cxxopts
OPTIONS
"CXXOPTS_BUILD_EXAMPLES OFF")

# --------------------------------------------------------------------------------------------------
# date - used for time formatting in the logging widget
# --------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit fc5d84a

Please sign in to comment.