Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Awl - A working library

NotificationsYou must be signed in to change notification settings

dmitriano/Awl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWL - A Working Library

AWL is a small cross-platform C++ library that includes:

  1. A simple binaryserialization framework.
  2. Memory stream, buffered stream, hashing stream.
  3. Aset that finds an element by both key and index with O(logN) time.
  4. Adoubly linked list with static insert and erase methods.
  5. Anobservable with movable observers.
  6. Apool of reusable objects managed with std::shared_ptr.
  7. Bitset based on enum.
  8. Acircular buffer with an interface similar to std::queue.
  9. Other simple classes like CompositeCompare, ReverseCompare, scope_guard, etc...
  10. A simpletesting framework.

Theoretically, the master branch should compile with C++20 and work, at least it is periodically built withMSVC 19.39.33523,GCC 13.1.0,Android CLang 17.0.2 (from NDK 26) andApple Clang 15.0.0.15000309 (on MacOS Sonoma with Xcode 15.4).

There is also cpp17 branch that partially compiles with C++17.

Version compatibility is not guaranteed and there is no warranty of any kind.

Feel free to use it or fork it, report a bug by opening an issue.

To leave the author a message fill theform on his website.

Compiling on Windows with CMake and MSVC 2022:

cmake ..\..\Awl -G"Visual Studio 17 2022" -A x64cmake --build . --target AwlTest --config Release

or

msbuild AwlTest.sln /p:Configuration=Release /p:Platform=x64

It also builds for x86 using the following command:

cmake ..\..\Awl -G"Visual Studio 17 2022" -A win32

but with couple warnings related to std::streamsize that are not fixed yet.

Compiling on Linux with CMake and GCC:

cmake ../../Awl/ -DCMAKE_BUILD_TYPE=Releasecmake --build. --parallel

or

cmake ../../Awl/ -DCMAKE_BUILD_TYPE=Debugcmake --build. --parallel

Compiling on Ubuntu 22.04 with GCC13.1 (I am not sure if build-essential is really needed):

sudo apt install build-essentialsudo apt install cmakesudo add-apt-repository ppa:ubuntu-toolchain-r/testsudo apt updatesudo apt install gcc-13 g++-13ll /usr/bin/gcc-13ll /usr/bin/g++-13update-alternatives --display gccll /etc/alternatives/g*sudo update-alternatives --remove-all gccsudo update-alternatives --remove-all g++sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 10 --slave /usr/bin/g++ g++ /usr/bin/g++-13g++ --versiongcc --versionmkdir reposcd reposgit clone https://github.com/dmitriano/Awlmkdir -p build/awlcd build/awlcmake ../../Awl/ -DCMAKE_BUILD_TYPE=Releasecmake --build. --parallel

Compiling with Ninja generator (Used these commands on MacOS):

cmake ../../repos/Awl/ -G Ninjacmake --build. --parallel --target AwlTest --config RelWithDebInfo

Compiling a separate source file (by example ofVtsTest.cpp):

cmake --build. --parallel --target CMakeFiles/AwlTest.dir/Tests/VtsTest.cpp.o

Compiling with QT and Boost on Windows

Use-DAWL_STATIC_RUNTIME:BOOL=ON CMake option if QT is compiled with static runtime:

%MY_DRIVE%cd \dev\build\awlset MY_CMAKE_EXE=%MY_DRIVE%\dev\tools\cmake-3.24.2-windows-x86_64\bin\cmake.exeset MY_QT_DIR=%MY_DRIVE%\dev\libs\Qt6\windowsset MY_BOOST_DIR=%MY_DRIVE%\dev\libs\boost_1_80_0set MY_VS_GENERATOR="Visual Studio 17 2022"set OPENSSL_ROOT_DIR=%MY_DRIVE%/dev/libs/OpenSSLset OPENSSL_USE_STATIC_LIBS=ON%MY_CMAKE_EXE% ..\..\repos\Awl -G %MY_VS_GENERATOR% -A x64 -D CMAKE_PREFIX_PATH="%MY_QT_DIR%;%MY_BOOST_DIR%" -DAWL_NO_DEPRECATED:BOOL=ON -DAWL_STATIC_RUNTIME:BOOL=ON -DAWL_ANSI_CMD_CHAR:BOOL=ONmsbuild Awl.sln /p:Configuration=Debug /p:Platform=x64msbuild Awl.sln /p:Configuration=RelWithDebInfo /p:Platform=x64

Using GCC sanitizer

Add-DAWL_SANITIZE_ADDRESS=1 or-DAWL_SANITIZE_UNDEFINED=1 or-DAWL_SANITIZE_THREAD=1 to CMake command, for example:

cmake ../../repos/Awl/ -G Ninja -DAWL_SANITIZE_ADDRESS=1cmake --build. --parallel --target AwlTest --config RelWithDebInfo

Running the tests on Windows and Linux

Remove./ prefix on Windows and do not forget quotes on Linux:

./AwlTest

of

./AwlTest --filter".*_Test"

Running the benchmarks:

./AwlTest --filter".*_Benchmark" --output all

Running the examples:

./AwlTest --filter".*_Example" --output all

Do not run the commands below:

./AwlTest --filter".*_Unstable"

or

./AwlTest --filter".*"

they potentially can format your hard drive.

Running the tests on Android device

Built AWL for Android with-DAWL_STATIC_RUNTIME:BOOL=ON CMake option and if you use QT Creator do not forget to set-DAWL_FIND_QT:BOOL=OFF, upload the executable file to the device:

adb push AwlTest /data/local/tmp

and run it with the same options as on Linux:

adb shellcd /data/local/tmpchmod a+x AwlTest./AwlTest

or with a single command:

adb shell"cd /data/local/tmp && chmod a+x AwlTest && ./AwlTest"

or

adb shell"cd /data/local/tmp && chmod a+x AwlTest && ./AwlTest --filter .*CompositeCompare.*"

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp