Merge pull request 'Fixed cmake on fedora removed segfault' (#4) from xieamoe/gd-tools-plus:main into main

Reviewed-on: https://codeberg.org/hashirama/gd-tools/pulls/4
This commit is contained in:
千住柱間 2024-02-29 21:47:35 +00:00
commit d3eb63b2ce
3 changed files with 16 additions and 14 deletions

View file

@ -115,7 +115,7 @@ endif()
#Apple and other
if (NOT ${GUIX})
target_link_libraries(gd-tools_exe PRIVATE marisa cpr::cpr nlohmann_json::nlohmann_json rdricpp::rdricpp)
target_link_libraries(gd-tools_exe PRIVATE marisa cpr::cpr nlohmann_json::nlohmann_json rdricpp)
endif()
# ---- Install rules ----

View file

@ -6,6 +6,7 @@ if ( (NOT ${GUIX}) )
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.5.2)
FetchContent_MakeAvailable(catch)
include(Catch)
endif() #Adds Catch2::Catch2
include(CTest)

View file

@ -164,6 +164,8 @@ auto main(/*int const argc, char const* const* const argv*/) -> int
#ifndef WIN32 //General Main
auto main(int const argc, char const* const* const argv) -> int
{
if(argc > 1){
std::vector<std::string_view> args{};
for(int i{0}; i < argc; i++)
args.push_back(argv[i]);
@ -177,8 +179,7 @@ auto main(int const argc, char const* const* const argv) -> int
}
take_action(args);
//Original code
//take_action(std::vector<std::string_view>{ argv, std::next(argv, argc) });
}else
take_action(std::vector<std::string_view>{ argv, std::next(argv, argc) });
}
#endif //General Main