🔥 made API version not setuable by CMake

This commit is contained in:
EntireTwix 2021-07-03 15:00:35 -07:00
parent ee8bd88c96
commit b2fcd69a57
3 changed files with 10 additions and 17 deletions

View file

@ -58,12 +58,6 @@ else()
set(CONSERVATIVE_DISK_SAVE_VAL true) set(CONSERVATIVE_DISK_SAVE_VAL true)
endif() endif()
if(API_VERSION)
set(API_VERSION_VAL ${API_VERSION})
else()
set(API_VERSION_VAL 1)
endif()
if(MULTI_THREADED) if(MULTI_THREADED)
set(MULTI_THREADED_VAL ${MULTI_THREADED}) set(MULTI_THREADED_VAL ${MULTI_THREADED})
else() else()

View file

@ -36,6 +36,6 @@ version 2 will work
version 3 will work version 3 will work
etc etc
*/ */
#define API_VERSION @API_VERSION_VAL@ #define API_VERSION 1
#define MULTI_THREADED @MULTI_THREADED_VAL@ #define MULTI_THREADED @MULTI_THREADED_VAL@

View file

@ -27,16 +27,15 @@ cd build
### CMake Flags ### CMake Flags
there are multiple flags responsible configuring CCash: there are multiple flags responsible configuring CCash:
| name | default | description | pros | cons | | name | default | description | pros | cons |
| :--------------------- | :----------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ------------------------------------------------------------- | | :--------------------- | :--------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ----------------------------------------------------------- |
| USER_SAVE_LOC | "../users.json" | where the users are saved | `N/A` | `N/A` | | USER_SAVE_LOC | "../users.json" | where the users are saved | `N/A` | `N/A` |
| DROGON_CONFIG_LOC | "../config.json" | where the config is located | `N/A` | `N/A` | | DROGON_CONFIG_LOC | "../config.json" | where the config is located | `N/A` | `N/A` |
| MAX_LOG_SIZE | 100 | max number of logs per user, last `n` transactions. If both this and pre log are toggled to 0 logs will not be compiled. | large history | higher memory usage | | MAX_LOG_SIZE | 100 | max number of logs per user, last `n` transactions. If both this and pre log are toggled to 0 logs will not be compiled. | large history | higher memory usage |
| PRE_LOG_SIZE | 10 | the amount of transactions allocated in advance | faster to not alloc each transaction | higher memory usage | | PRE_LOG_SIZE | 10 | the amount of transactions allocated in advance | faster to not alloc each transaction | higher memory usage |
| CONSERVATIVE_DISK_SAVE | `true` | when `true` only saves when changes are made | low # of disk operations | some atomic overhead | | CONSERVATIVE_DISK_SAVE | `true` | when `true` only saves when changes are made | low # of disk operations | some atomic overhead |
| API_VERSION | ${CURRENT_VERSION} | indicates which API version is being used, often backwards compatible | `N/A` | `N/A` | | MULTI_THREADED | `true` | when `true` the program is compiled to utilize `n` threads which corresponds to how many Cores your CPU has, plus 1 for saving | speed | memory lock overhead may be in vain on single core machines |
| MULTI_THREADED | `true` | when `true` the program is compiled to utilize `n` threads which corresponds to how many Cores your CPU has, plus 1 for saving | speed | memory lock overhead may be in vain on a single core machines | | RETURN_ON_DEL_NAME | `N/A` | when defined, return on delete will be toggled and any accounts deleted will send their funds to the defined account, this prevent currency destruction | prevents destruction of currency | deleting accounts is made slower |
| RETURN_ON_DEL_NAME | `N/A` | when defined, return on delete will be toggled and any accounts deleted will send their funds to the defined account, this prevent currency destruction | prevents destruction of currency | deleting accounts is made slower |
simply running simply running
``` ```