diff options
| author | 2022-04-29 10:48:09 +0200 | |
|---|---|---|
| committer | 2022-04-29 10:48:09 +0200 | |
| commit | 07c5f6ec23fcf9237a24e71adcfacabce677f818 (patch) | |
| tree | 588e8c5f82b9163181fad3581f610e6f1d88cba4 | |
| parent | a9153f1615a842cfb9e9bcda4d9071e202618569 (diff) | |
| download | OneRoll-07c5f6ec23fcf9237a24e71adcfacabce677f818.tar.gz OneRoll-07c5f6ec23fcf9237a24e71adcfacabce677f818.zip | |
Change file organization.
| -rw-r--r-- | CMakeLists.txt | 142 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | src/bin/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/bin/cli/CMakeLists.txt (renamed from cli/CMakeLists.txt) | 20 | ||||
| -rw-r--r-- | src/bin/cli/cli.pri (renamed from cli/cli.pri) | 0 | ||||
| -rw-r--r-- | src/bin/cli/cmds.txt (renamed from cli/cmds.txt) | 0 | ||||
| -rw-r--r-- | src/bin/cli/dice.qrc (renamed from cli/dice.qrc) | 0 | ||||
| -rw-r--r-- | src/bin/cli/displaytoolbox.cpp (renamed from cli/displaytoolbox.cpp) | 0 | ||||
| -rw-r--r-- | src/bin/cli/displaytoolbox.h (renamed from cli/displaytoolbox.h) | 0 | ||||
| -rw-r--r-- | src/bin/cli/i18n/dice_en.ts (renamed from cli/i18n/dice_en.ts) | 0 | ||||
| -rw-r--r-- | src/bin/cli/i18n/dice_fr.ts (renamed from cli/i18n/dice_fr.ts) | 0 | ||||
| -rw-r--r-- | src/bin/cli/main.cpp (renamed from cli/main.cpp) | 0 | ||||
| -rw-r--r-- | src/bin/gui/gui.pri (renamed from gui/gui.pri) | 0 | ||||
| -rw-r--r-- | src/bin/gui/mainwindow.cpp (renamed from gui/mainwindow.cpp) | 0 | ||||
| -rw-r--r-- | src/bin/gui/mainwindow.h (renamed from gui/mainwindow.h) | 0 | ||||
| -rw-r--r-- | src/bin/gui/mainwindow.ui (renamed from gui/mainwindow.ui) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/CMakeLists.txt (renamed from mobile/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/commandmodel.cpp (renamed from mobile/commandmodel.cpp) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/commandmodel.h (renamed from mobile/commandmodel.h) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/deployment.pri (renamed from mobile/deployment.pri) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/main.cpp (renamed from mobile/main.cpp) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/main.qml (renamed from mobile/main.qml) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/maincontroller.cpp (renamed from mobile/maincontroller.cpp) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/maincontroller.h (renamed from mobile/maincontroller.h) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/mobile.pro (renamed from mobile/mobile.pro) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/mobile.qrc (renamed from mobile/mobile.qrc) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/qml.qrc (renamed from mobile/qml.qrc) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/qml/main.qml (renamed from mobile/qml/main.qml) | 0 | ||||
| -rw-r--r-- | src/bin/mobile/resources/images/add.png (renamed from mobile/resources/images/add.png) | bin | 4696 -> 4696 bytes | |||
| -rw-r--r-- | src/bin/webserver/CMakeLists.txt (renamed from webserver/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/bin/webserver/diceserver.cpp (renamed from webserver/diceserver.cpp) | 0 | ||||
| -rw-r--r-- | src/bin/webserver/diceserver.h (renamed from webserver/diceserver.h) | 0 | ||||
| -rw-r--r-- | src/bin/webserver/main.cpp (renamed from webserver/main.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/CMakeLists.txt | 131 | ||||
| -rw-r--r-- | src/libparser/booleancondition.cpp (renamed from booleancondition.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/booleancondition.h (renamed from booleancondition.h) | 0 | ||||
| -rw-r--r-- | src/libparser/compositevalidator.cpp (renamed from compositevalidator.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/compositevalidator.h (renamed from compositevalidator.h) | 0 | ||||
| -rw-r--r-- | src/libparser/dicealias.cpp (renamed from dicealias.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/diceparser.cpp (renamed from diceparser.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/diceparser.pc.in (renamed from diceparser.pc.in) | 0 | ||||
| -rw-r--r-- | src/libparser/diceroller.cpp (renamed from diceroller.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/die.cpp (renamed from die.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/die.h (renamed from die.h) | 0 | ||||
| -rw-r--r-- | src/libparser/highlightdice.cpp (renamed from highlightdice.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/include/diceparser/dicealias.h (renamed from include/diceparser/dicealias.h) | 0 | ||||
| -rw-r--r-- | src/libparser/include/diceparser/diceparser.h (renamed from include/diceparser/diceparser.h) | 0 | ||||
| -rw-r--r-- | src/libparser/include/diceparser/diceparser_global.h (renamed from include/diceparser/diceparser_global.h) | 0 | ||||
| -rw-r--r-- | src/libparser/include/diceparser/diceparserhelper.h (renamed from include/diceparser/diceparserhelper.h) | 0 | ||||
| -rw-r--r-- | src/libparser/include/diceparser/highlightdice.h (renamed from include/diceparser/highlightdice.h) | 0 | ||||
| -rw-r--r-- | src/libparser/include/diceparser/parsingtoolbox.h (renamed from include/diceparser/parsingtoolbox.h) | 0 | ||||
| -rw-r--r-- | src/libparser/include/diceparser_qobject/diceparser_qobject_global.h (renamed from include/diceparser_qobject/diceparser_qobject_global.h) | 0 | ||||
| -rw-r--r-- | src/libparser/include/diceparser_qobject/diceroller.h (renamed from include/diceparser_qobject/diceroller.h) | 0 | ||||
| -rw-r--r-- | src/libparser/include/diceparser_qobject/qmltypesregister.h (renamed from include/diceparser_qobject/qmltypesregister.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/allsamenode.cpp (renamed from node/allsamenode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/allsamenode.h (renamed from node/allsamenode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/bind.cpp (renamed from node/bind.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/bind.h (renamed from node/bind.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/countexecutenode.cpp (renamed from node/countexecutenode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/countexecutenode.h (renamed from node/countexecutenode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/dicerollernode.cpp (renamed from node/dicerollernode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/dicerollernode.h (renamed from node/dicerollernode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/executionnode.cpp (renamed from node/executionnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/executionnode.h (renamed from node/executionnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/explodedicenode.cpp (renamed from node/explodedicenode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/explodedicenode.h (renamed from node/explodedicenode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/filternode.cpp (renamed from node/filternode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/filternode.h (renamed from node/filternode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/forloopnode.cpp (renamed from node/forloopnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/forloopnode.h (renamed from node/forloopnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/groupnode.cpp (renamed from node/groupnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/groupnode.h (renamed from node/groupnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/helpnode.cpp (renamed from node/helpnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/helpnode.h (renamed from node/helpnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/ifnode.cpp (renamed from node/ifnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/ifnode.h (renamed from node/ifnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/jumpbackwardnode.cpp (renamed from node/jumpbackwardnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/jumpbackwardnode.h (renamed from node/jumpbackwardnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/keepdiceexecnode.cpp (renamed from node/keepdiceexecnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/keepdiceexecnode.h (renamed from node/keepdiceexecnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/listaliasnode.cpp (renamed from node/listaliasnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/listaliasnode.h (renamed from node/listaliasnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/listsetrollnode.cpp (renamed from node/listsetrollnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/listsetrollnode.h (renamed from node/listsetrollnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/mergenode.cpp (renamed from node/mergenode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/mergenode.h (renamed from node/mergenode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/node.pri (renamed from node/node.pri) | 0 | ||||
| -rw-r--r-- | src/libparser/node/numbernode.cpp (renamed from node/numbernode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/numbernode.h (renamed from node/numbernode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/occurencecountnode.cpp (renamed from node/occurencecountnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/occurencecountnode.h (renamed from node/occurencecountnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/paintnode.cpp (renamed from node/paintnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/paintnode.h (renamed from node/paintnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/parenthesesnode.cpp (renamed from node/parenthesesnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/parenthesesnode.h (renamed from node/parenthesesnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/repeaternode.cpp (renamed from node/repeaternode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/repeaternode.h (renamed from node/repeaternode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/replacevaluenode.cpp (renamed from node/replacevaluenode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/replacevaluenode.h (renamed from node/replacevaluenode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/rerolldicenode.cpp (renamed from node/rerolldicenode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/rerolldicenode.h (renamed from node/rerolldicenode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/scalaroperatornode.cpp (renamed from node/scalaroperatornode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/scalaroperatornode.h (renamed from node/scalaroperatornode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/sortresult.cpp (renamed from node/sortresult.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/sortresult.h (renamed from node/sortresult.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/splitnode.cpp (renamed from node/splitnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/splitnode.h (renamed from node/splitnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/startingnode.cpp (renamed from node/startingnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/startingnode.h (renamed from node/startingnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/stringnode.cpp (renamed from node/stringnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/stringnode.h (renamed from node/stringnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/switchcasenode.cpp (renamed from node/switchcasenode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/switchcasenode.h (renamed from node/switchcasenode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/uniquenode.cpp (renamed from node/uniquenode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/uniquenode.h (renamed from node/uniquenode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/valueslistnode.cpp (renamed from node/valueslistnode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/valueslistnode.h (renamed from node/valueslistnode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/node/variablenode.cpp (renamed from node/variablenode.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/node/variablenode.h (renamed from node/variablenode.h) | 0 | ||||
| -rw-r--r-- | src/libparser/operationcondition.cpp (renamed from operationcondition.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/operationcondition.h (renamed from operationcondition.h) | 0 | ||||
| -rw-r--r-- | src/libparser/parsingtoolbox.cpp (renamed from parsingtoolbox.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/qmltypesregister.cpp (renamed from qmltypesregister.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/range.cpp (renamed from range.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/range.h (renamed from range.h) | 0 | ||||
| -rw-r--r-- | src/libparser/result/diceresult.cpp (renamed from result/diceresult.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/result/diceresult.h (renamed from result/diceresult.h) | 0 | ||||
| -rw-r--r-- | src/libparser/result/result.cpp (renamed from result/result.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/result/result.h (renamed from result/result.h) | 0 | ||||
| -rw-r--r-- | src/libparser/result/scalarresult.cpp (renamed from result/scalarresult.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/result/scalarresult.h (renamed from result/scalarresult.h) | 0 | ||||
| -rw-r--r-- | src/libparser/result/stringresult.cpp (renamed from result/stringresult.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/result/stringresult.h (renamed from result/stringresult.h) | 0 | ||||
| -rw-r--r-- | src/libparser/validator.cpp (renamed from validator.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/validator.h (renamed from validator.h) | 0 | ||||
| -rw-r--r-- | src/libparser/validatorlist.cpp (renamed from validatorlist.cpp) | 0 | ||||
| -rw-r--r-- | src/libparser/validatorlist.h (renamed from validatorlist.h) | 0 | ||||
| -rw-r--r-- | src/tests/CMakeLists.txt (renamed from tests/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/tests/dice/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | src/tests/dice/testnode.cpp (renamed from tests/dice/testnode.cpp) | 0 | ||||
| -rw-r--r-- | src/tests/dice/testnode.h (renamed from tests/dice/testnode.h) | 0 | ||||
| -rw-r--r-- | src/tests/dice/tst_dice.cpp (renamed from tests/dice/tst_dice.cpp) | 0 | ||||
| -rw-r--r-- | src/tests/fuzzer/CMakeLists.txt (renamed from tests/fuzzer/CMakeLists.txt) | 0 | ||||
| -rwxr-xr-x | src/tests/fuzzer/run_test.sh (renamed from tests/fuzzer/run_test.sh) | 0 | ||||
| -rw-r--r-- | src/tests/fuzzer/testcase.cpp (renamed from tests/fuzzer/testcase.cpp) | 0 | ||||
| -rw-r--r-- | src/tests/fuzzer/testcase_dir/gooddata.txt (renamed from tests/fuzzer/testcase_dir/gooddata.txt) | 0 | ||||
| -rw-r--r-- | tests/dice/CMakeLists.txt | 14 |
147 files changed, 167 insertions, 164 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e4d0536..7c538e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,145 +2,17 @@ cmake_minimum_required(VERSION 3.16) project(diceparser VERSION 1.9.0 DESCRIPTION "Parser of dice command") -set(QT_REQUIRED_VERSION "6.3.0") -set(QT_VERSION_MAJOR "6") -find_package(Qt${QT_VERSION_MAJOR} ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core Test Gui Svg) -find_package(Qt${QT_VERSION_MAJOR} ${QT_REQUIRED_VERSION} CONFIG COMPONENTS Qml Concurrent) - -enable_testing(true) -include_directories(${CMAKE_CURRENT_SOURCE_DIR} result node) option(BUILD_CLI OFF) +option(TESTS OFF) +option(NO_PAINTER_OPERATOR OFF) -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -set(dice_header_path include/diceparser) - -set(dice_public_headers ${dice_header_path}/diceparser_global.h -${dice_header_path}/dicealias.h -${dice_header_path}/diceparser.h -${dice_header_path}/diceparserhelper.h -${dice_header_path}/highlightdice.h -${dice_header_path}/parsingtoolbox.h # should no be public… -) - - -SET( dice_sources - ${CMAKE_CURRENT_SOURCE_DIR}/diceparser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/range.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/booleancondition.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/validator.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/validatorlist.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/operationcondition.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/die.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/parsingtoolbox.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/dicealias.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/result/result.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/result/scalarresult.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/result/stringresult.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/result/diceresult.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/countexecutenode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/dicerollernode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/executionnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/explodedicenode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/helpnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/allsamenode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/mergenode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/jumpbackwardnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/keepdiceexecnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/listaliasnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/listsetrollnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/numbernode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/parenthesesnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/paintnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/rerolldicenode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/scalaroperatornode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/sortresult.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/startingnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/filternode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/stringnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/ifnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/splitnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/groupnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/bind.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/occurencecountnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/uniquenode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/highlightdice.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/variablenode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/valueslistnode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/repeaternode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/switchcasenode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/node/replacevaluenode.cpp -) - -IF(STATIC_BUILD) - add_library(diceparser_static STATIC ${dice_sources} ) - target_include_directories(diceparser_static PRIVATE include) - target_link_libraries(diceparser_static PUBLIC Qt6::Core Qt6::Gui Qt6::Svg) - install(TARGETS diceparser_static - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -endif() - -set(documentation README.md HelpMe.md CHANGELOG) - -add_library(diceparser_shared SHARED ${dice_sources} ${documentation} ${dice_public_headers}) -set_target_properties(diceparser_shared PROPERTIES PUBLIC_HEADER "${public_header_widget}") -target_compile_definitions(diceparser_shared PRIVATE DICEPARSER_LIBRARY) - -target_include_directories(diceparser_shared PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - PUBLIC - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> - $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) - -SET_TARGET_PROPERTIES(diceparser_shared PROPERTIES OUTPUT_NAME diceparser CLEAN_DIRECT_OUTPUT 1) -target_link_libraries(diceparser_shared PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Svg) - -set_target_properties(diceparser_shared PROPERTIES VERSION ${PROJECT_VERSION}) -set_target_properties(diceparser_shared PROPERTIES SOVERSION 1) - -IF(BUILD_CLI) - add_subdirectory(cli) +IF(TESTS) + enable_testing() ENDIF() -if(TESTS) -add_subdirectory( tests ) -endif() - -include(GNUInstallDirs) - - -configure_file(diceparser.pc.in diceparser.pc @ONLY) - -install(TARGETS diceparser_shared - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/diceparser.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig) - -if(Qt${QT_VERSION_MAJOR}Qml_FOUND) - set(dice_header_qobject include/diceparser_qobject/diceparser_qobject_global.h include/diceparser_qobject/qmltypesregister.h include/diceparser_qobject/diceroller.h) - set(dice_source_qobject qmltypesregister.cpp diceroller.cpp) - set(CMAKE_AUTOMOC ON) - set(CMAKE_AUTOUIC ON) - set(CMAKE_AUTORCC ON) - set(CMAKE_INCLUDE_CURRENT_DIR ON) - add_library(diceparser_qobject SHARED ${dice_header_qobject} ${dice_source_qobject}) - set_target_properties(diceparser_qobject PROPERTIES PUBLIC_HEADER "${dice_header_qobject}") - target_compile_definitions(diceparser_qobject PRIVATE DICEPARSER_QOBJECT_LIBRARY) - target_link_libraries(diceparser_qobject PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::Qml Qt${QT_VERSION_MAJOR}::Concurrent PRIVATE diceparser_shared) - message("Messages diceparser ${CMAKE_CURRENT_SOURCE_DIR}/include") - - target_include_directories(diceparser_qobject PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - PUBLIC - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> - $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) - - - install(TARGETS diceparser_qobject - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -endif() - +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..d200d8a --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.16) + + +add_subdirectory(libparser) +add_subdirectory(bin) + +if(TESTS) + add_subdirectory(tests) +endif()
\ No newline at end of file diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt new file mode 100644 index 0000000..5e1ebd3 --- /dev/null +++ b/src/bin/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.16) + +if(BUILD_CLI) + add_subdirectory(cli) +endif()
\ No newline at end of file diff --git a/cli/CMakeLists.txt b/src/bin/cli/CMakeLists.txt index c25eecd..07d080f 100644 --- a/cli/CMakeLists.txt +++ b/src/bin/cli/CMakeLists.txt @@ -13,9 +13,7 @@ set(CMAKE_AUTOMOC ON) set(EXECUTABLE_OUTPUT_PATH bin/) # Find the QtWidgets library -set(QT_REQUIRED_VERSION "6.3.0") - - +set(QT_REQUIRED_VERSION "6.2.0") IF(NO_PAINTER_OPERATOR) find_package(Qt6 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core Svg LinguistTools) @@ -25,13 +23,8 @@ else() add_definitions(-DPAINTER_OP) endif() - set(MODE "cli") -ADD_DEFINITIONS( - -std=c++11 -) - set(dice_RESOURCES diceparser.qrc) find_package(Qt6LinguistTools) find_package(Qt6Svg) @@ -46,10 +39,10 @@ ELSE() FILE(GLOB dice_TS "${CMAKE_CURRENT_SOURCE_DIR}/i18n/*.ts") ENDIF(UPDATE_TRANSLATIONS) -if(Qt5Core_FOUND) +if(Qt6Core_FOUND) MESSAGE(status "find" ${dice_TS} ${translate_SRCS} ) - QT5_ADD_RESOURCES(dice_RESOURCES_RCC ${dice_RESOURCES}) - set(QT_PLUGINS_DIR "${Qt5Core_DIR}/../../../plugins") + QT_ADD_RESOURCES(dice_RESOURCES_RCC ${dice_RESOURCES}) + set(QT_PLUGINS_DIR "${Qt6Core_DIR}/../../../plugins") get_target_property(QT_LIBRARY_DIR Qt6::Core LOCATION) get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH) endif() @@ -59,11 +52,8 @@ SET( cli_sources displaytoolbox.cpp ) -set(documentation_files ../HelpMe.md ../README.md) - -add_executable( dice ${cli_sources} ${dice_QM} ${documentation_files}) +add_executable( dice ${cli_sources} ${dice_QM}) set(diceparser_shared_INCLUDE_DIRS "../diceparser") -target_include_directories(dice PRIVATE ../include ../ ../result ../node) link_directories(BEFORE ${CMAKE_BINARY_DIR}) IF(NO_PAINTER_OPERATOR) target_link_libraries(dice PUBLIC Qt6::Core Qt6::Svg PRIVATE diceparser_shared) diff --git a/cli/cli.pri b/src/bin/cli/cli.pri index 69aa44f..69aa44f 100644 --- a/cli/cli.pri +++ b/src/bin/cli/cli.pri diff --git a/cli/cmds.txt b/src/bin/cli/cmds.txt index f5c7e1e..f5c7e1e 100644 --- a/cli/cmds.txt +++ b/src/bin/cli/cmds.txt diff --git a/cli/dice.qrc b/src/bin/cli/dice.qrc index e69de29..e69de29 100644 --- a/cli/dice.qrc +++ b/src/bin/cli/dice.qrc diff --git a/cli/displaytoolbox.cpp b/src/bin/cli/displaytoolbox.cpp index 1709d18..1709d18 100644 --- a/cli/displaytoolbox.cpp +++ b/src/bin/cli/displaytoolbox.cpp diff --git a/cli/displaytoolbox.h b/src/bin/cli/displaytoolbox.h index 5a22b0f..5a22b0f 100644 --- a/cli/displaytoolbox.h +++ b/src/bin/cli/displaytoolbox.h diff --git a/cli/i18n/dice_en.ts b/src/bin/cli/i18n/dice_en.ts index 3efc610..3efc610 100644 --- a/cli/i18n/dice_en.ts +++ b/src/bin/cli/i18n/dice_en.ts diff --git a/cli/i18n/dice_fr.ts b/src/bin/cli/i18n/dice_fr.ts index 438e99b..438e99b 100644 --- a/cli/i18n/dice_fr.ts +++ b/src/bin/cli/i18n/dice_fr.ts diff --git a/cli/main.cpp b/src/bin/cli/main.cpp index 0420ac3..0420ac3 100644 --- a/cli/main.cpp +++ b/src/bin/cli/main.cpp diff --git a/gui/gui.pri b/src/bin/gui/gui.pri index c31fd79..c31fd79 100644 --- a/gui/gui.pri +++ b/src/bin/gui/gui.pri diff --git a/gui/mainwindow.cpp b/src/bin/gui/mainwindow.cpp index 5b8422e..5b8422e 100644 --- a/gui/mainwindow.cpp +++ b/src/bin/gui/mainwindow.cpp diff --git a/gui/mainwindow.h b/src/bin/gui/mainwindow.h index bd19b34..bd19b34 100644 --- a/gui/mainwindow.h +++ b/src/bin/gui/mainwindow.h diff --git a/gui/mainwindow.ui b/src/bin/gui/mainwindow.ui index d09f866..d09f866 100644 --- a/gui/mainwindow.ui +++ b/src/bin/gui/mainwindow.ui diff --git a/mobile/CMakeLists.txt b/src/bin/mobile/CMakeLists.txt index ddc0543..ddc0543 100644 --- a/mobile/CMakeLists.txt +++ b/src/bin/mobile/CMakeLists.txt diff --git a/mobile/commandmodel.cpp b/src/bin/mobile/commandmodel.cpp index 7b50397..7b50397 100644 --- a/mobile/commandmodel.cpp +++ b/src/bin/mobile/commandmodel.cpp diff --git a/mobile/commandmodel.h b/src/bin/mobile/commandmodel.h index 4037032..4037032 100644 --- a/mobile/commandmodel.h +++ b/src/bin/mobile/commandmodel.h diff --git a/mobile/deployment.pri b/src/bin/mobile/deployment.pri index 265ce71..265ce71 100644 --- a/mobile/deployment.pri +++ b/src/bin/mobile/deployment.pri diff --git a/mobile/main.cpp b/src/bin/mobile/main.cpp index 9b81329..9b81329 100644 --- a/mobile/main.cpp +++ b/src/bin/mobile/main.cpp diff --git a/mobile/main.qml b/src/bin/mobile/main.qml index 700f3a7..700f3a7 100644 --- a/mobile/main.qml +++ b/src/bin/mobile/main.qml diff --git a/mobile/maincontroller.cpp b/src/bin/mobile/maincontroller.cpp index 6f301ff..6f301ff 100644 --- a/mobile/maincontroller.cpp +++ b/src/bin/mobile/maincontroller.cpp diff --git a/mobile/maincontroller.h b/src/bin/mobile/maincontroller.h index 43fc1ae..43fc1ae 100644 --- a/mobile/maincontroller.h +++ b/src/bin/mobile/maincontroller.h diff --git a/mobile/mobile.pro b/src/bin/mobile/mobile.pro index 2e33522..2e33522 100644 --- a/mobile/mobile.pro +++ b/src/bin/mobile/mobile.pro diff --git a/mobile/mobile.qrc b/src/bin/mobile/mobile.qrc index 69145a8..69145a8 100644 --- a/mobile/mobile.qrc +++ b/src/bin/mobile/mobile.qrc diff --git a/mobile/qml.qrc b/src/bin/mobile/qml.qrc index 2cbbe08..2cbbe08 100644 --- a/mobile/qml.qrc +++ b/src/bin/mobile/qml.qrc diff --git a/mobile/qml/main.qml b/src/bin/mobile/qml/main.qml index ed9d480..ed9d480 100644 --- a/mobile/qml/main.qml +++ b/src/bin/mobile/qml/main.qml diff --git a/mobile/resources/images/add.png b/src/bin/mobile/resources/images/add.png Binary files differindex c8e1bd2..c8e1bd2 100644 --- a/mobile/resources/images/add.png +++ b/src/bin/mobile/resources/images/add.png diff --git a/webserver/CMakeLists.txt b/src/bin/webserver/CMakeLists.txt index 3fa9b56..3fa9b56 100644 --- a/webserver/CMakeLists.txt +++ b/src/bin/webserver/CMakeLists.txt diff --git a/webserver/diceserver.cpp b/src/bin/webserver/diceserver.cpp index a3f094d..a3f094d 100644 --- a/webserver/diceserver.cpp +++ b/src/bin/webserver/diceserver.cpp diff --git a/webserver/diceserver.h b/src/bin/webserver/diceserver.h index fa32814..fa32814 100644 --- a/webserver/diceserver.h +++ b/src/bin/webserver/diceserver.h diff --git a/webserver/main.cpp b/src/bin/webserver/main.cpp index 664a026..664a026 100644 --- a/webserver/main.cpp +++ b/src/bin/webserver/main.cpp diff --git a/src/libparser/CMakeLists.txt b/src/libparser/CMakeLists.txt new file mode 100644 index 0000000..e477696 --- /dev/null +++ b/src/libparser/CMakeLists.txt @@ -0,0 +1,131 @@ +cmake_minimum_required(VERSION 3.16) + +set(QT_REQUIRED_VERSION "6.2.0") +set(QT_VERSION_MAJOR "6") +find_package(Qt${QT_VERSION_MAJOR} ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core Test Gui Svg) +find_package(Qt${QT_VERSION_MAJOR} ${QT_REQUIRED_VERSION} CONFIG COMPONENTS Qml Concurrent) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} result node) + +set(dice_header_path include/diceparser) + +set(dice_public_headers ${dice_header_path}/diceparser_global.h +${dice_header_path}/dicealias.h +${dice_header_path}/diceparser.h +${dice_header_path}/diceparserhelper.h +${dice_header_path}/highlightdice.h +${dice_header_path}/parsingtoolbox.h # should no be public… +) + + +SET( dice_sources + ${CMAKE_CURRENT_SOURCE_DIR}/diceparser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/range.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/booleancondition.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/validator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/validatorlist.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/operationcondition.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/die.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/parsingtoolbox.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dicealias.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/result/result.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/result/scalarresult.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/result/stringresult.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/result/diceresult.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/countexecutenode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/dicerollernode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/executionnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/explodedicenode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/helpnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/allsamenode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/mergenode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/jumpbackwardnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/keepdiceexecnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/listaliasnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/listsetrollnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/numbernode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/parenthesesnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/paintnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/rerolldicenode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/scalaroperatornode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/sortresult.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/startingnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/filternode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/stringnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/ifnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/splitnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/groupnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/bind.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/occurencecountnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/uniquenode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/highlightdice.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/variablenode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/valueslistnode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/repeaternode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/switchcasenode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/node/replacevaluenode.cpp +) + +IF(STATIC_BUILD) + add_library(diceparser_static STATIC ${dice_sources} ) + target_include_directories(diceparser_static PRIVATE include) + target_link_libraries(diceparser_static PUBLIC Qt6::Core Qt6::Gui Qt6::Svg) + install(TARGETS diceparser_static + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() + + + +add_library(diceparser_shared SHARED ${dice_sources} ${dice_public_headers}) +set_target_properties(diceparser_shared PROPERTIES PUBLIC_HEADER "${public_header_widget}") +target_compile_definitions(diceparser_shared PRIVATE DICEPARSER_LIBRARY) + +target_include_directories(diceparser_shared PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) + +SET_TARGET_PROPERTIES(diceparser_shared PROPERTIES OUTPUT_NAME diceparser CLEAN_DIRECT_OUTPUT 1) +target_link_libraries(diceparser_shared PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Svg) + +set_target_properties(diceparser_shared PROPERTIES VERSION ${PROJECT_VERSION}) +set_target_properties(diceparser_shared PROPERTIES SOVERSION 1) + + +include(GNUInstallDirs) + + +configure_file(diceparser.pc.in diceparser.pc @ONLY) + +install(TARGETS diceparser_shared + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/diceparser.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig) + +if(Qt${QT_VERSION_MAJOR}Qml_FOUND) + set(dice_header_qobject include/diceparser_qobject/diceparser_qobject_global.h include/diceparser_qobject/qmltypesregister.h include/diceparser_qobject/diceroller.h) + set(dice_source_qobject qmltypesregister.cpp diceroller.cpp) + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTOUIC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_INCLUDE_CURRENT_DIR ON) + add_library(diceparser_qobject SHARED ${dice_header_qobject} ${dice_source_qobject}) + set_target_properties(diceparser_qobject PROPERTIES PUBLIC_HEADER "${dice_header_qobject}") + target_compile_definitions(diceparser_qobject PRIVATE DICEPARSER_QOBJECT_LIBRARY) + target_link_libraries(diceparser_qobject PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::Qml Qt${QT_VERSION_MAJOR}::Concurrent PRIVATE diceparser_shared) + message("Messages diceparser ${CMAKE_CURRENT_SOURCE_DIR}/include") + + target_include_directories(diceparser_qobject PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) + + + install(TARGETS diceparser_qobject + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +endif() + + + diff --git a/booleancondition.cpp b/src/libparser/booleancondition.cpp index 91be35c..91be35c 100644 --- a/booleancondition.cpp +++ b/src/libparser/booleancondition.cpp diff --git a/booleancondition.h b/src/libparser/booleancondition.h index d49c5fe..d49c5fe 100644 --- a/booleancondition.h +++ b/src/libparser/booleancondition.h diff --git a/compositevalidator.cpp b/src/libparser/compositevalidator.cpp index b0f127d..b0f127d 100644 --- a/compositevalidator.cpp +++ b/src/libparser/compositevalidator.cpp diff --git a/compositevalidator.h b/src/libparser/compositevalidator.h index c2c066a..c2c066a 100644 --- a/compositevalidator.h +++ b/src/libparser/compositevalidator.h diff --git a/dicealias.cpp b/src/libparser/dicealias.cpp index a5c079d..a5c079d 100644 --- a/dicealias.cpp +++ b/src/libparser/dicealias.cpp diff --git a/diceparser.cpp b/src/libparser/diceparser.cpp index af86acc..af86acc 100644 --- a/diceparser.cpp +++ b/src/libparser/diceparser.cpp diff --git a/diceparser.pc.in b/src/libparser/diceparser.pc.in index 61b5aea..61b5aea 100644 --- a/diceparser.pc.in +++ b/src/libparser/diceparser.pc.in diff --git a/diceroller.cpp b/src/libparser/diceroller.cpp index e1c8ded..e1c8ded 100644 --- a/diceroller.cpp +++ b/src/libparser/diceroller.cpp diff --git a/die.cpp b/src/libparser/die.cpp index 4214b97..4214b97 100644 --- a/die.cpp +++ b/src/libparser/die.cpp diff --git a/die.h b/src/libparser/die.h index 2da2006..2da2006 100644 --- a/die.h +++ b/src/libparser/die.h diff --git a/highlightdice.cpp b/src/libparser/highlightdice.cpp index e92451f..e92451f 100644 --- a/highlightdice.cpp +++ b/src/libparser/highlightdice.cpp diff --git a/include/diceparser/dicealias.h b/src/libparser/include/diceparser/dicealias.h index 05d5a0b..05d5a0b 100644 --- a/include/diceparser/dicealias.h +++ b/src/libparser/include/diceparser/dicealias.h diff --git a/include/diceparser/diceparser.h b/src/libparser/include/diceparser/diceparser.h index bf2d570..bf2d570 100644 --- a/include/diceparser/diceparser.h +++ b/src/libparser/include/diceparser/diceparser.h diff --git a/include/diceparser/diceparser_global.h b/src/libparser/include/diceparser/diceparser_global.h index 47829cc..47829cc 100644 --- a/include/diceparser/diceparser_global.h +++ b/src/libparser/include/diceparser/diceparser_global.h diff --git a/include/diceparser/diceparserhelper.h b/src/libparser/include/diceparser/diceparserhelper.h index 6190df2..6190df2 100644 --- a/include/diceparser/diceparserhelper.h +++ b/src/libparser/include/diceparser/diceparserhelper.h diff --git a/include/diceparser/highlightdice.h b/src/libparser/include/diceparser/highlightdice.h index a3928a1..a3928a1 100644 --- a/include/diceparser/highlightdice.h +++ b/src/libparser/include/diceparser/highlightdice.h diff --git a/include/diceparser/parsingtoolbox.h b/src/libparser/include/diceparser/parsingtoolbox.h index 69f433a..69f433a 100644 --- a/include/diceparser/parsingtoolbox.h +++ b/src/libparser/include/diceparser/parsingtoolbox.h diff --git a/include/diceparser_qobject/diceparser_qobject_global.h b/src/libparser/include/diceparser_qobject/diceparser_qobject_global.h index ea49727..ea49727 100644 --- a/include/diceparser_qobject/diceparser_qobject_global.h +++ b/src/libparser/include/diceparser_qobject/diceparser_qobject_global.h diff --git a/include/diceparser_qobject/diceroller.h b/src/libparser/include/diceparser_qobject/diceroller.h index 72c4e10..72c4e10 100644 --- a/include/diceparser_qobject/diceroller.h +++ b/src/libparser/include/diceparser_qobject/diceroller.h diff --git a/include/diceparser_qobject/qmltypesregister.h b/src/libparser/include/diceparser_qobject/qmltypesregister.h index e0b1a09..e0b1a09 100644 --- a/include/diceparser_qobject/qmltypesregister.h +++ b/src/libparser/include/diceparser_qobject/qmltypesregister.h diff --git a/node/allsamenode.cpp b/src/libparser/node/allsamenode.cpp index 3b2f10f..3b2f10f 100644 --- a/node/allsamenode.cpp +++ b/src/libparser/node/allsamenode.cpp diff --git a/node/allsamenode.h b/src/libparser/node/allsamenode.h index e5c1dc2..e5c1dc2 100644 --- a/node/allsamenode.h +++ b/src/libparser/node/allsamenode.h diff --git a/node/bind.cpp b/src/libparser/node/bind.cpp index 490071f..490071f 100644 --- a/node/bind.cpp +++ b/src/libparser/node/bind.cpp diff --git a/node/bind.h b/src/libparser/node/bind.h index 71bbfb0..71bbfb0 100644 --- a/node/bind.h +++ b/src/libparser/node/bind.h diff --git a/node/countexecutenode.cpp b/src/libparser/node/countexecutenode.cpp index b45fe37..b45fe37 100644 --- a/node/countexecutenode.cpp +++ b/src/libparser/node/countexecutenode.cpp diff --git a/node/countexecutenode.h b/src/libparser/node/countexecutenode.h index 37b7a4f..37b7a4f 100644 --- a/node/countexecutenode.h +++ b/src/libparser/node/countexecutenode.h diff --git a/node/dicerollernode.cpp b/src/libparser/node/dicerollernode.cpp index 2b00c0a..2b00c0a 100644 --- a/node/dicerollernode.cpp +++ b/src/libparser/node/dicerollernode.cpp diff --git a/node/dicerollernode.h b/src/libparser/node/dicerollernode.h index 52178cb..52178cb 100644 --- a/node/dicerollernode.h +++ b/src/libparser/node/dicerollernode.h diff --git a/node/executionnode.cpp b/src/libparser/node/executionnode.cpp index 4545934..4545934 100644 --- a/node/executionnode.cpp +++ b/src/libparser/node/executionnode.cpp diff --git a/node/executionnode.h b/src/libparser/node/executionnode.h index d1bdf66..d1bdf66 100644 --- a/node/executionnode.h +++ b/src/libparser/node/executionnode.h diff --git a/node/explodedicenode.cpp b/src/libparser/node/explodedicenode.cpp index 1546883..1546883 100644 --- a/node/explodedicenode.cpp +++ b/src/libparser/node/explodedicenode.cpp diff --git a/node/explodedicenode.h b/src/libparser/node/explodedicenode.h index 77b4a44..77b4a44 100644 --- a/node/explodedicenode.h +++ b/src/libparser/node/explodedicenode.h diff --git a/node/filternode.cpp b/src/libparser/node/filternode.cpp index b72b6e1..b72b6e1 100644 --- a/node/filternode.cpp +++ b/src/libparser/node/filternode.cpp diff --git a/node/filternode.h b/src/libparser/node/filternode.h index 7af6fe2..7af6fe2 100644 --- a/node/filternode.h +++ b/src/libparser/node/filternode.h diff --git a/node/forloopnode.cpp b/src/libparser/node/forloopnode.cpp index aba6ff4..aba6ff4 100644 --- a/node/forloopnode.cpp +++ b/src/libparser/node/forloopnode.cpp diff --git a/node/forloopnode.h b/src/libparser/node/forloopnode.h index a9acf20..a9acf20 100644 --- a/node/forloopnode.h +++ b/src/libparser/node/forloopnode.h diff --git a/node/groupnode.cpp b/src/libparser/node/groupnode.cpp index 860d758..860d758 100644 --- a/node/groupnode.cpp +++ b/src/libparser/node/groupnode.cpp diff --git a/node/groupnode.h b/src/libparser/node/groupnode.h index d037080..d037080 100644 --- a/node/groupnode.h +++ b/src/libparser/node/groupnode.h diff --git a/node/helpnode.cpp b/src/libparser/node/helpnode.cpp index 8ab48a9..8ab48a9 100644 --- a/node/helpnode.cpp +++ b/src/libparser/node/helpnode.cpp diff --git a/node/helpnode.h b/src/libparser/node/helpnode.h index a333c6d..a333c6d 100644 --- a/node/helpnode.h +++ b/src/libparser/node/helpnode.h diff --git a/node/ifnode.cpp b/src/libparser/node/ifnode.cpp index 8de3cd5..8de3cd5 100644 --- a/node/ifnode.cpp +++ b/src/libparser/node/ifnode.cpp diff --git a/node/ifnode.h b/src/libparser/node/ifnode.h index 912d65c..912d65c 100644 --- a/node/ifnode.h +++ b/src/libparser/node/ifnode.h diff --git a/node/jumpbackwardnode.cpp b/src/libparser/node/jumpbackwardnode.cpp index 9fa0f45..9fa0f45 100644 --- a/node/jumpbackwardnode.cpp +++ b/src/libparser/node/jumpbackwardnode.cpp diff --git a/node/jumpbackwardnode.h b/src/libparser/node/jumpbackwardnode.h index 598a540..598a540 100644 --- a/node/jumpbackwardnode.h +++ b/src/libparser/node/jumpbackwardnode.h diff --git a/node/keepdiceexecnode.cpp b/src/libparser/node/keepdiceexecnode.cpp index b197822..b197822 100644 --- a/node/keepdiceexecnode.cpp +++ b/src/libparser/node/keepdiceexecnode.cpp diff --git a/node/keepdiceexecnode.h b/src/libparser/node/keepdiceexecnode.h index 0dd6616..0dd6616 100644 --- a/node/keepdiceexecnode.h +++ b/src/libparser/node/keepdiceexecnode.h diff --git a/node/listaliasnode.cpp b/src/libparser/node/listaliasnode.cpp index c3f6d31..c3f6d31 100644 --- a/node/listaliasnode.cpp +++ b/src/libparser/node/listaliasnode.cpp diff --git a/node/listaliasnode.h b/src/libparser/node/listaliasnode.h index 2a6f96e..2a6f96e 100644 --- a/node/listaliasnode.h +++ b/src/libparser/node/listaliasnode.h diff --git a/node/listsetrollnode.cpp b/src/libparser/node/listsetrollnode.cpp index 2cee645..2cee645 100644 --- a/node/listsetrollnode.cpp +++ b/src/libparser/node/listsetrollnode.cpp diff --git a/node/listsetrollnode.h b/src/libparser/node/listsetrollnode.h index a6c5e1a..a6c5e1a 100644 --- a/node/listsetrollnode.h +++ b/src/libparser/node/listsetrollnode.h diff --git a/node/mergenode.cpp b/src/libparser/node/mergenode.cpp index 096bb8c..096bb8c 100644 --- a/node/mergenode.cpp +++ b/src/libparser/node/mergenode.cpp diff --git a/node/mergenode.h b/src/libparser/node/mergenode.h index 515a2e9..515a2e9 100644 --- a/node/mergenode.h +++ b/src/libparser/node/mergenode.h diff --git a/node/node.pri b/src/libparser/node/node.pri index 6cf7005..6cf7005 100644 --- a/node/node.pri +++ b/src/libparser/node/node.pri diff --git a/node/numbernode.cpp b/src/libparser/node/numbernode.cpp index e50656e..e50656e 100644 --- a/node/numbernode.cpp +++ b/src/libparser/node/numbernode.cpp diff --git a/node/numbernode.h b/src/libparser/node/numbernode.h index 02df984..02df984 100644 --- a/node/numbernode.h +++ b/src/libparser/node/numbernode.h diff --git a/node/occurencecountnode.cpp b/src/libparser/node/occurencecountnode.cpp index fc5c2f2..fc5c2f2 100644 --- a/node/occurencecountnode.cpp +++ b/src/libparser/node/occurencecountnode.cpp diff --git a/node/occurencecountnode.h b/src/libparser/node/occurencecountnode.h index 4801bfb..4801bfb 100644 --- a/node/occurencecountnode.h +++ b/src/libparser/node/occurencecountnode.h diff --git a/node/paintnode.cpp b/src/libparser/node/paintnode.cpp index 22c020e..22c020e 100644 --- a/node/paintnode.cpp +++ b/src/libparser/node/paintnode.cpp diff --git a/node/paintnode.h b/src/libparser/node/paintnode.h index 06d849e..06d849e 100644 --- a/node/paintnode.h +++ b/src/libparser/node/paintnode.h diff --git a/node/parenthesesnode.cpp b/src/libparser/node/parenthesesnode.cpp index 9557536..9557536 100644 --- a/node/parenthesesnode.cpp +++ b/src/libparser/node/parenthesesnode.cpp diff --git a/node/parenthesesnode.h b/src/libparser/node/parenthesesnode.h index 153dfc1..153dfc1 100644 --- a/node/parenthesesnode.h +++ b/src/libparser/node/parenthesesnode.h diff --git a/node/repeaternode.cpp b/src/libparser/node/repeaternode.cpp index f93a9fe..f93a9fe 100644 --- a/node/repeaternode.cpp +++ b/src/libparser/node/repeaternode.cpp diff --git a/node/repeaternode.h b/src/libparser/node/repeaternode.h index fa1a50a..fa1a50a 100644 --- a/node/repeaternode.h +++ b/src/libparser/node/repeaternode.h diff --git a/node/replacevaluenode.cpp b/src/libparser/node/replacevaluenode.cpp index c313fb0..c313fb0 100644 --- a/node/replacevaluenode.cpp +++ b/src/libparser/node/replacevaluenode.cpp diff --git a/node/replacevaluenode.h b/src/libparser/node/replacevaluenode.h index 36bdec2..36bdec2 100644 --- a/node/replacevaluenode.h +++ b/src/libparser/node/replacevaluenode.h diff --git a/node/rerolldicenode.cpp b/src/libparser/node/rerolldicenode.cpp index fd8c258..fd8c258 100644 --- a/node/rerolldicenode.cpp +++ b/src/libparser/node/rerolldicenode.cpp diff --git a/node/rerolldicenode.h b/src/libparser/node/rerolldicenode.h index 68b732e..68b732e 100644 --- a/node/rerolldicenode.h +++ b/src/libparser/node/rerolldicenode.h diff --git a/node/scalaroperatornode.cpp b/src/libparser/node/scalaroperatornode.cpp index c1c4dc5..c1c4dc5 100644 --- a/node/scalaroperatornode.cpp +++ b/src/libparser/node/scalaroperatornode.cpp diff --git a/node/scalaroperatornode.h b/src/libparser/node/scalaroperatornode.h index 57a1049..57a1049 100644 --- a/node/scalaroperatornode.h +++ b/src/libparser/node/scalaroperatornode.h diff --git a/node/sortresult.cpp b/src/libparser/node/sortresult.cpp index 5d514cf..5d514cf 100644 --- a/node/sortresult.cpp +++ b/src/libparser/node/sortresult.cpp diff --git a/node/sortresult.h b/src/libparser/node/sortresult.h index f7510be..f7510be 100644 --- a/node/sortresult.h +++ b/src/libparser/node/sortresult.h diff --git a/node/splitnode.cpp b/src/libparser/node/splitnode.cpp index 8faa0a5..8faa0a5 100644 --- a/node/splitnode.cpp +++ b/src/libparser/node/splitnode.cpp diff --git a/node/splitnode.h b/src/libparser/node/splitnode.h index 0ceeb00..0ceeb00 100644 --- a/node/splitnode.h +++ b/src/libparser/node/splitnode.h diff --git a/node/startingnode.cpp b/src/libparser/node/startingnode.cpp index 97248c6..97248c6 100644 --- a/node/startingnode.cpp +++ b/src/libparser/node/startingnode.cpp diff --git a/node/startingnode.h b/src/libparser/node/startingnode.h index eea72a9..eea72a9 100644 --- a/node/startingnode.h +++ b/src/libparser/node/startingnode.h diff --git a/node/stringnode.cpp b/src/libparser/node/stringnode.cpp index e908463..e908463 100644 --- a/node/stringnode.cpp +++ b/src/libparser/node/stringnode.cpp diff --git a/node/stringnode.h b/src/libparser/node/stringnode.h index 4079b7f..4079b7f 100644 --- a/node/stringnode.h +++ b/src/libparser/node/stringnode.h diff --git a/node/switchcasenode.cpp b/src/libparser/node/switchcasenode.cpp index 880fa4d..880fa4d 100644 --- a/node/switchcasenode.cpp +++ b/src/libparser/node/switchcasenode.cpp diff --git a/node/switchcasenode.h b/src/libparser/node/switchcasenode.h index a0f658d..a0f658d 100644 --- a/node/switchcasenode.h +++ b/src/libparser/node/switchcasenode.h diff --git a/node/uniquenode.cpp b/src/libparser/node/uniquenode.cpp index c4668be..c4668be 100644 --- a/node/uniquenode.cpp +++ b/src/libparser/node/uniquenode.cpp diff --git a/node/uniquenode.h b/src/libparser/node/uniquenode.h index 039ba11..039ba11 100644 --- a/node/uniquenode.h +++ b/src/libparser/node/uniquenode.h diff --git a/node/valueslistnode.cpp b/src/libparser/node/valueslistnode.cpp index 33a347d..33a347d 100644 --- a/node/valueslistnode.cpp +++ b/src/libparser/node/valueslistnode.cpp diff --git a/node/valueslistnode.h b/src/libparser/node/valueslistnode.h index 100f275..100f275 100644 --- a/node/valueslistnode.h +++ b/src/libparser/node/valueslistnode.h diff --git a/node/variablenode.cpp b/src/libparser/node/variablenode.cpp index 709ab46..709ab46 100644 --- a/node/variablenode.cpp +++ b/src/libparser/node/variablenode.cpp diff --git a/node/variablenode.h b/src/libparser/node/variablenode.h index 8bf1cb1..8bf1cb1 100644 --- a/node/variablenode.h +++ b/src/libparser/node/variablenode.h diff --git a/operationcondition.cpp b/src/libparser/operationcondition.cpp index 70ebab4..70ebab4 100644 --- a/operationcondition.cpp +++ b/src/libparser/operationcondition.cpp diff --git a/operationcondition.h b/src/libparser/operationcondition.h index 719624f..719624f 100644 --- a/operationcondition.h +++ b/src/libparser/operationcondition.h diff --git a/parsingtoolbox.cpp b/src/libparser/parsingtoolbox.cpp index dfde37f..dfde37f 100644 --- a/parsingtoolbox.cpp +++ b/src/libparser/parsingtoolbox.cpp diff --git a/qmltypesregister.cpp b/src/libparser/qmltypesregister.cpp index dbd2ac9..dbd2ac9 100644 --- a/qmltypesregister.cpp +++ b/src/libparser/qmltypesregister.cpp diff --git a/range.cpp b/src/libparser/range.cpp index 39a8f66..39a8f66 100644 --- a/range.cpp +++ b/src/libparser/range.cpp diff --git a/range.h b/src/libparser/range.h index 276ed55..276ed55 100644 --- a/range.h +++ b/src/libparser/range.h diff --git a/result/diceresult.cpp b/src/libparser/result/diceresult.cpp index 31e316b..31e316b 100644 --- a/result/diceresult.cpp +++ b/src/libparser/result/diceresult.cpp diff --git a/result/diceresult.h b/src/libparser/result/diceresult.h index 1b35b7e..1b35b7e 100644 --- a/result/diceresult.h +++ b/src/libparser/result/diceresult.h diff --git a/result/result.cpp b/src/libparser/result/result.cpp index ca410b3..ca410b3 100644 --- a/result/result.cpp +++ b/src/libparser/result/result.cpp diff --git a/result/result.h b/src/libparser/result/result.h index 4432682..4432682 100644 --- a/result/result.h +++ b/src/libparser/result/result.h diff --git a/result/scalarresult.cpp b/src/libparser/result/scalarresult.cpp index dcbaa61..dcbaa61 100644 --- a/result/scalarresult.cpp +++ b/src/libparser/result/scalarresult.cpp diff --git a/result/scalarresult.h b/src/libparser/result/scalarresult.h index 73fe73b..73fe73b 100644 --- a/result/scalarresult.h +++ b/src/libparser/result/scalarresult.h diff --git a/result/stringresult.cpp b/src/libparser/result/stringresult.cpp index 113c22c..113c22c 100644 --- a/result/stringresult.cpp +++ b/src/libparser/result/stringresult.cpp diff --git a/result/stringresult.h b/src/libparser/result/stringresult.h index b0ca539..b0ca539 100644 --- a/result/stringresult.h +++ b/src/libparser/result/stringresult.h diff --git a/validator.cpp b/src/libparser/validator.cpp index 201574b..201574b 100644 --- a/validator.cpp +++ b/src/libparser/validator.cpp diff --git a/validator.h b/src/libparser/validator.h index ca15f67..ca15f67 100644 --- a/validator.h +++ b/src/libparser/validator.h diff --git a/validatorlist.cpp b/src/libparser/validatorlist.cpp index f1d1ba4..f1d1ba4 100644 --- a/validatorlist.cpp +++ b/src/libparser/validatorlist.cpp diff --git a/validatorlist.h b/src/libparser/validatorlist.h index ad2c9d4..ad2c9d4 100644 --- a/validatorlist.h +++ b/src/libparser/validatorlist.h diff --git a/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 6fb276b..6fb276b 100644 --- a/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt diff --git a/src/tests/dice/CMakeLists.txt b/src/tests/dice/CMakeLists.txt new file mode 100644 index 0000000..e6973dd --- /dev/null +++ b/src/tests/dice/CMakeLists.txt @@ -0,0 +1,10 @@ +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-permissive -pedantic -Wall") +set(CMAKE_AUTOMOC ON) +find_package(Qt6 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Svg Test) + +set(test_source testnode.cpp tst_dice.cpp) +add_executable(test_dice ${test_source}) + +target_link_libraries(test_dice PUBLIC Qt6::Core Qt6::Gui Qt6::Test PRIVATE diceparser_shared) +target_include_directories(test_dice PRIVATE ../../libparser/include ../../libparser/ ../../libparser/node ../../libparser/result) +add_test(NAME tst_diceparser COMMAND test_dice) diff --git a/tests/dice/testnode.cpp b/src/tests/dice/testnode.cpp index de9fc05..de9fc05 100644 --- a/tests/dice/testnode.cpp +++ b/src/tests/dice/testnode.cpp diff --git a/tests/dice/testnode.h b/src/tests/dice/testnode.h index 5c918ee..5c918ee 100644 --- a/tests/dice/testnode.h +++ b/src/tests/dice/testnode.h diff --git a/tests/dice/tst_dice.cpp b/src/tests/dice/tst_dice.cpp index 9318341..9318341 100644 --- a/tests/dice/tst_dice.cpp +++ b/src/tests/dice/tst_dice.cpp diff --git a/tests/fuzzer/CMakeLists.txt b/src/tests/fuzzer/CMakeLists.txt index b93a1d3..b93a1d3 100644 --- a/tests/fuzzer/CMakeLists.txt +++ b/src/tests/fuzzer/CMakeLists.txt diff --git a/tests/fuzzer/run_test.sh b/src/tests/fuzzer/run_test.sh index 9ecdeef..9ecdeef 100755 --- a/tests/fuzzer/run_test.sh +++ b/src/tests/fuzzer/run_test.sh diff --git a/tests/fuzzer/testcase.cpp b/src/tests/fuzzer/testcase.cpp index 87d1867..87d1867 100644 --- a/tests/fuzzer/testcase.cpp +++ b/src/tests/fuzzer/testcase.cpp diff --git a/tests/fuzzer/testcase_dir/gooddata.txt b/src/tests/fuzzer/testcase_dir/gooddata.txt index d62c87e..d62c87e 100644 --- a/tests/fuzzer/testcase_dir/gooddata.txt +++ b/src/tests/fuzzer/testcase_dir/gooddata.txt diff --git a/tests/dice/CMakeLists.txt b/tests/dice/CMakeLists.txt deleted file mode 100644 index f07fa71..0000000 --- a/tests/dice/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall") -set(CMAKE_AUTOMOC ON) -find_package(Qt6 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Svg Test) - -set(test_source testnode.cpp tst_dice.cpp) - -add_executable(test_dice ${test_source}) - -target_include_directories(test_dice PRIVATE ../../include ../../ ../../node ../../result) - -find_library(DICEPARSER_LIBRARY diceparser HINTS ${CMAKE_CURRENT_BINARY_DIR}/../../) - -target_link_libraries(test_dice PUBLIC Qt6::Core Qt6::Gui Qt6::Test diceparser_shared) -add_test(tst_diceparser test_dice) |