🐎 made xxhash dynamically linked

This commit is contained in:
EntireTwix 2021-06-10 13:14:12 -07:00
parent 8228a53d01
commit cc23bc8142
5 changed files with 12 additions and 5373 deletions

View file

@ -11,6 +11,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
find_package(Threads)
find_package(xxhash)
add_executable(${PROJECT_NAME} main.cpp )
target_sources(${PROJECT_NAME} PRIVATE
src/bank_f.cpp
@ -18,7 +19,6 @@ target_sources(${PROJECT_NAME} PRIVATE
src/log.cpp
src/transaction.cpp
src/user.cpp
src/xxhash.c
)
target_include_directories(${PROJECT_NAME} PUBLIC include)
@ -28,3 +28,4 @@ target_include_directories(${PROJECT_NAME} PUBLIC third_party/drogon/lib/inc)
add_subdirectory(third_party/drogon)
target_link_libraries(${PROJECT_NAME} PRIVATE drogon)
target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_THREAD_LIBS_INIT} )
target_link_libraries(${PROJECT_NAME} PRIVATE xxhash)

View file

@ -18,7 +18,10 @@ drogon depedencies (varies by OS/distro)
```
sudo apt install libjsoncpp-dev uuid-dev openssl libssl-dev zlib1g-dev
```
xxhash depedency
```
sudo apt install xxhash
```
building the project
```
@ -55,7 +58,7 @@ Go to [here](help.md) to see the API's endpoints. Using the Bank's API allows (y
Thank you to the contributors
| Name | Work |
| :--- | --- |
| :------------------------------------------ | ----------------------------------------- |
| [Expand](https://github.com/Expand-sys) | Frontend |
| [React](https://github.com/Reactified) | CC {API, Shops, and ATM} |
| [Doggo](https://github.com/FearlessDoggo21) | Logs loading/adding Optimized, Python API |

View file

@ -2,7 +2,7 @@
#include <json/json.h>
#include <string>
#include <algorithm>
#include "xxhash.h"
#include <xxhash.h>
#include "log.h"
struct User

File diff suppressed because it is too large Load diff

View file

@ -1,42 +0,0 @@
/*
* xxHash - Extremely Fast Hash algorithm
* Copyright (C) 2012-2020 Yann Collet
*
* BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You can contact the author at:
* - xxHash homepage: https://www.xxhash.com
* - xxHash source repository: https://github.com/Cyan4973/xxHash
*/
/*
* xxhash.c instantiates functions defined in xxhash.h
*/
#define XXH_STATIC_LINKING_ONLY /* access advanced declarations */
#define XXH_IMPLEMENTATION /* access definitions */
#include "xxhash.h"