Skip to content

Commit

Permalink
Remove the debug defines when building with RelWithDebInfo (#2096)
Browse files Browse the repository at this point in the history
  • Loading branch information
HellAholic authored Jun 20, 2024
2 parents 3dc1b99 + b7dee9f commit 2f395b0
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,6 @@ target_compile_definitions(_CuraEngine
$<$<CONFIG:Debug>:ASSERT_INSANE_OUTPUT>
$<$<CONFIG:Debug>:USE_CPU_TIME>
$<$<CONFIG:Debug>:DEBUG>
$<$<CONFIG:RelWithDebInfo>:ASSERT_INSANE_OUTPUT>
$<$<CONFIG:RelWithDebInfo>:USE_CPU_TIME>
$<$<CONFIG:RelWithDebInfo>:DEBUG>
)

enable_sanitizers(_CuraEngine)
Expand Down
7 changes: 6 additions & 1 deletion include/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ class Application : NoCopy
#endif // ARCUS

/*!
* \brief Print the header and license to the stderr channel.
* \brief Print the header to the stderr channel.
*/
void printHeader() const;

/*!
* \brief Print the license to the stderr channel.
*/
void printLicense() const;

Expand Down
42 changes: 41 additions & 1 deletion src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,49 @@ void Application::printHelp() const
fmt::print("\n");
}

void Application::printLicense() const
void Application::printHeader() const
{
fmt::print("\n");
fmt::print("Cura_SteamEngine version {}\n", CURA_ENGINE_VERSION);

#ifdef DEBUG
fmt::print("\n");
fmt::print(" _______ ________ _______ __ __ ______\n");
fmt::print("/ \\ / |/ \\ / | / | / \\\n");
fmt::print("███████ |████████/ ███████ |██ | ██ |/██████ |\n");
fmt::print("██ | ██ |██ |__ ██ |__██ |██ | ██ |██ | _██/\n");
fmt::print("██ | ██ |██ | ██ ██< ██ | ██ |██ |/ |\n");
fmt::print("██ | ██ |█████/ ███████ |██ | ██ |██ |████ |\n");
fmt::print("██ |__██ |██ |_____ ██ |__██ |██ \\__██ |██ \\__██ |\n");
fmt::print("██ ██/ ██ |██ ██/ ██ ██/ ██ ██/\n");
fmt::print("███████/ ████████/ ███████/ ██████/ ██████/\n");
fmt::print("\n");
fmt::print(" __ __ ______ _______ ________\n");
fmt::print("/ \\ / | / \\ / \\ / |\n");
fmt::print("██ \\ /██ |/██████ |███████ |████████/\n");
fmt::print("███ \\ /███ |██ | ██ |██ | ██ |██ |__\n");
fmt::print("████ /████ |██ | ██ |██ | ██ |██ |\n");
fmt::print("██ ██ ██/██ |██ | ██ |██ | ██ |█████/\n");
fmt::print("██ |███/ ██ |██ \\__██ |██ |__██ |██ |_____\n");
fmt::print("██ | █/ ██ |██ ██/ ██ ██/ ██ |\n");
fmt::print("██/ ██/ ██████/ ███████/ ████████/\n");
fmt::print("\n");

fmt::print("#########################################################\n");
fmt::print("#########################################################\n");
fmt::print("## WARNING: This version of CuraEngine has been built ##\n");
fmt::print("## in developper mode. This may impact performances, ##\n");
fmt::print("## provoke unexpected results or crashes. ##\n");
fmt::print("## If you downloaded an official version of CuraEngine ##\n");
fmt::print("## and see this message, please report the issue. ##\n");
fmt::print("#########################################################\n");
fmt::print("#########################################################\n");
#endif
}

void Application::printLicense() const
{
fmt::print("\n");
fmt::print("Copyright (C) 2024 Ultimaker\n");
fmt::print("\n");
fmt::print("This program is free software: you can redistribute it and/or modify\n");
Expand Down Expand Up @@ -184,6 +223,7 @@ void Application::run(const size_t argc, char** argv)
argc_ = argc;
argv_ = argv;

printHeader();
printLicense();
Progress::init();

Expand Down

0 comments on commit 2f395b0

Please sign in to comment.