diff --git a/CMakeLists.txt b/CMakeLists.txt index f4482c7f588b1a7defe90aebb55a3ce6d160cfe9..b40851fd5182c706d909f8364397c42a14962aa2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,27 +69,6 @@ if(WIN32) endif(WIN32) -add_executable(LoaderDemo - src/main.cpp - examples/dynamicLoadDummy.cpp -) - -target_include_directories(LoaderDemo PRIVATE - include -) - -# Set the WIN32_EXECUTABLE property conditionally for Release, MinSizeRel, and RelWithDebInfo builds. -# This lets the exe run without a terminal, making stdout inaccessible for now. -if(WIN32) - set_target_properties(LoaderDemo PROPERTIES WIN32_EXECUTABLE $<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>,$<CONFIG:RelWithDebInfo>>) -endif(WIN32) - -# Use this command to copy the .dll from the lib folder next to the freshly built .exe. Which is the most simple way to get it working. -#add_custom_command(TARGET LoaderDemo POST_BUILD # Adds a post-build event to DynamicDemo -# COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..." -# "${PROJECT_SOURCE_DIR}/lib/cute.dll" # <--this is in-file -# $<TARGET_FILE_DIR:LoaderDemo>) # <--this is out-file path - add_executable(TSP src/main.cpp examples/TSP.cpp diff --git a/examples/dynamicLoadDummy.cpp b/examples/dynamicLoadDummy.cpp deleted file mode 100644 index 88a4c4a08c7f67aa482a00c6896a72952a7c7d38..0000000000000000000000000000000000000000 --- a/examples/dynamicLoadDummy.cpp +++ /dev/null @@ -1,87 +0,0 @@ -#include "cute.h" - - -void superDummy(); -void advancedDummy(); -void bubblesort(); - -// Is run once at startup. -void setup() -{ - //cute::setPlotTitle(0, "Hallo"); - //cute::setPlotTitle(1, "Hochschule"); - //cute::setPlotTitle(2, "Reutlingen"); - cute::logMessage("Hello CuteLib! :D"); - cute::setProgress(69); - //cute::setPlotVisible(1); - cute::setStatusMessage("Hallo TEC"); - cute::registerAlgorithm(superDummy, "DummyAlgo"); - cute::registerAlgorithm(advancedDummy, "Problem"); - cute::setProblemFile("example.csv"); - cute::setProblemSize(4); - cute::enableAutorun(); -} - -void superDummy() -{ - int prog = 0; - while (cute::ok()) - { - cute::setProgress(prog); - cute::setStatusMessage(std::to_string(prog)); - ++prog; - if (prog > 100) - prog = 0; - - cute::delay(200); - } - cute::logMessage("Ended cleanly \\(^-^)/"); - cute::setProgress(0); -} - - -std::string fvec2str(std::vector<float> v) -{ - std::string s; - for (size_t i = 0; i < v.size() - 1; i++) - { - s += std::to_string(v[i]); - while (s.back() == '0') - { - s.pop_back(); - } - s += ", "; - } - s += std::to_string(v.back()); - while (s.back() == '0') - { - s.pop_back(); - } - return s; -} - -std::string point2str(cute::Point p) -{ - std::string s = "( " + std::to_string(p.x); - while (s.back() == '0') - s.pop_back(); - s += " , "; - s += std::to_string(p.y); - while (s.back() == '0') - s.pop_back(); - s += " )"; - return s; -} - -void advancedDummy() -{ - std::vector<float> problem1D = cute::getProblemData1D(); - cute::logMessage(fvec2str(problem1D)); - cute::setPlotTheme(problem1D.size() - 1); - std::vector<cute::Point> problem2D = cute::getProblemData2D(); - for (auto&& p : problem2D) - { - cute::logMessage(point2str(p)); - } - cute::setStatusMessage("Done already!"); -}