Initial commit

This commit is contained in:
2026-01-23 17:36:05 +01:00
commit 037b93291d
14 changed files with 312 additions and 0 deletions

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022-2023 Romain BOULLARD
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

26
profiles/clang Normal file
View File

@@ -0,0 +1,26 @@
[settings]
os=Linux
arch=x86_64
compiler=clang
compiler.version=18
compiler.libcxx=libstdc++11
compiler.cppstd=20
compiler.cstd=17
build_type=Release
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:generator=Ninja
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
tools.build:exelinkflags=["-fuse-ld=mold", "-flto"]
tools.build:sharedlinkflags=["-fuse-ld=mold", "-flto"]
tools.build:cflags=["-flto"]
tools.build:cxxflags=["-flto"]
&:tools.build:cflags=["-flto", "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-ffast-math"]
&:tools.build:cxxflags=["-flto", "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-fno-exceptions", "-fno-rtti", "-ffast-math"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

View File

@@ -0,0 +1,24 @@
[settings]
os=Linux
arch=x86_64
compiler=clang
compiler.version=18
compiler.libcxx=libstdc++11
compiler.cppstd=20
compiler.cstd=17
build_type=Release
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:generator=Ninja
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
tools.build:exelinkflags=["-fuse-ld=mold", "-flto"]
tools.build:sharedlinkflags=["-fuse-ld=mold", "-flto"]
tools.build:cflags=["-flto"]
tools.build:cxxflags=["-flto"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

View File

@@ -0,0 +1,24 @@
[settings]
os=Linux
arch=x86_64
compiler=clang
compiler.version=18
compiler.libcxx=libstdc++11
compiler.cppstd=20
compiler.cstd=17
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:generator=Ninja
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
tools.build:exelinkflags=["-fuse-ld=mold"]
tools.build:sharedlinkflags=["-fuse-ld=mold"]
tools.build:cflags=[]
tools.build:cxxflags=[]
[tool_requires]
!cmake/*: cmake/[>=4.2]

26
profiles/clang_unity Normal file
View File

@@ -0,0 +1,26 @@
[settings]
os=Linux
arch=x86_64
compiler=clang
compiler.version=18
compiler.libcxx=libstdc++11
compiler.cppstd=20
compiler.cstd=17
build_type=Release
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache', 'CMAKE_UNITY_BUILD': 'True'}
tools.cmake.cmaketoolchain:generator=Ninja
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
tools.build:exelinkflags=["-fuse-ld=mold", "-flto"]
tools.build:sharedlinkflags=["-fuse-ld=mold", "-flto"]
tools.build:cflags=["-flto"]
tools.build:cxxflags=["-flto"]
&:tools.build:cflags=["-flto", "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-ffast-math"]
&:tools.build:cxxflags=["-flto", "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-fno-exceptions", "-fno-rtti", "-ffast-math"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

26
profiles/clang_unityd Normal file
View File

@@ -0,0 +1,26 @@
[settings]
os=Linux
arch=x86_64
compiler=clang
compiler.version=18
compiler.libcxx=libstdc++11
compiler.cppstd=20
compiler.cstd=17
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache', 'CMAKE_UNITY_BUILD': 'True'}
tools.cmake.cmaketoolchain:generator=Ninja
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
tools.build:exelinkflags=["-fuse-ld=mold"]
tools.build:sharedlinkflags=["-fuse-ld=mold"]
tools.build:cflags=[]
tools.build:cxxflags=[]
&:tools.build:cflags=["-Wall", "-Wextra", "-Wpedantic", "-Werror", "-ffast-math"]
&:tools.build:cxxflags=["-Wall", "-Wextra", "-Wpedantic", "-Werror", "-fno-exceptions", "-fno-rtti", "-ffast-math"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

26
profiles/clangd Normal file
View File

@@ -0,0 +1,26 @@
[settings]
os=Linux
arch=x86_64
compiler=clang
compiler.version=18
compiler.libcxx=libstdc++11
compiler.cppstd=20
compiler.cstd=17
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:generator=Ninja
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
tools.build:exelinkflags=["-fuse-ld=mold"]
tools.build:sharedlinkflags=["-fuse-ld=mold"]
tools.build:cflags=[]
tools.build:cxxflags=[]
&:tools.build:cflags=["-Wall", "-Wextra", "-Wpedantic", "-Werror", "-ffast-math"]
&:tools.build:cxxflags=["-Wall", "-Wextra", "-Wpedantic", "-Werror", "-fno-exceptions", "-fno-rtti", "-ffast-math"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

25
profiles/gcc_coverage Normal file
View File

@@ -0,0 +1,25 @@
[settings]
os=Linux
arch=x86_64
compiler=gcc
compiler.version=13
compiler.libcxx=libstdc++11
compiler.cppstd=20
compiler.cstd=17
build_type=Release
[conf]
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
tools.cmake.cmaketoolchain:generator=Ninja
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True
tools.build:exelinkflags=["--coverage"]
tools.build:sharedlinkflags=["--coverage"]
tools.build:cflags=["-fprofile-abs-path", "--coverage", "-fno-inline-functions"]
tools.build:cxxflags=["-fprofile-abs-path", "--coverage", "-fno-inline-functions"]
&:tools.build:cflags=["-fprofile-abs-path", "--coverage", "-fno-inline-functions", "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-ffast-math"]
&:tools.build:cxxflags=["-fprofile-abs-path", "--coverage", "-fno-inline-functions", "-Wall", "-Wextra", "-Wpedantic", "-Werror", "-fno-exceptions", "-fno-rtti", "-ffast-math"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

23
profiles/msvc Normal file
View File

@@ -0,0 +1,23 @@
[settings]
os=Windows
arch=x86_64
compiler=msvc
compiler.version=195
compiler.cppstd=20
compiler.cstd=17
compiler.runtime=dynamic
build_type=Release
[conf]
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_remove_ehsc.cmake
tools.build:exelinkflags=["/LTCG", "/INCREMENTAL:NO"]
tools.build:sharedlinkflags=["/LTCG", "/INCREMENTAL:NO"]
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1", "/GL"]
tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary", "/GL"]
&:tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/W4", "/WX", "/fp:fast", "/GL"]
&:tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary", "/W4", "/WX", "/EHs-", "/D_HAS_EXCEPTIONS=0", "/GR-", "/fp:fast", "/GL"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

View File

@@ -0,0 +1,19 @@
# https://github.com/ccache/ccache/wiki/MS-Visual-Studio#usage-with-cmake
find_program(ccache_exe ccache)
if(ccache_exe)
file(COPY_FILE
${ccache_exe} ${CMAKE_BINARY_DIR}/cl.exe
ONLY_IF_DIFFERENT)
# By default Visual Studio generators will use /Zi which is not compatible
# with ccache, so tell Visual Studio to use /Z7 instead.
message(STATUS "Setting MSVC debug information format to 'Embedded'")
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
set(CMAKE_VS_GLOBALS
"CLToolExe=cl.exe"
"CLToolPath=${CMAKE_BINARY_DIR}"
"UseMultiToolTask=true"
)
endif()

View File

@@ -0,0 +1 @@
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

24
profiles/msvc_unity Normal file
View File

@@ -0,0 +1,24 @@
[settings]
os=Windows
arch=x86_64
compiler=msvc
compiler.version=195
compiler.cppstd=20
compiler.cstd=17
compiler.runtime=dynamic
build_type=Release
[conf]
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_remove_ehsc.cmake
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_UNITY_BUILD': 'True'}
tools.build:exelinkflags=["/LTCG", "/INCREMENTAL:NO"]
tools.build:sharedlinkflags=["/LTCG", "/INCREMENTAL:NO"]
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1", "/GL"]
tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary", "/GL"]
&:tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/W4", "/WX", "/fp:fast", "/GL"]
&:tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary", "/W4", "/WX", "/EHs-", "/D_HAS_EXCEPTIONS=0", "/GR-", "/fp:fast", "/GL"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

24
profiles/msvc_unityd Normal file
View File

@@ -0,0 +1,24 @@
[settings]
os=Windows
arch=x86_64
compiler=msvc
compiler.version=195
compiler.cppstd=20
compiler.cstd=17
compiler.runtime=dynamic
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_remove_ehsc.cmake
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_UNITY_BUILD': 'True'}
tools.build:exelinkflags=[]
tools.build:sharedlinkflags=[]
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary"]
&:tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/W4", "/WX", "/fp:fast"]
&:tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary", "/W4", "/WX", "/EHs-", "/D_HAS_EXCEPTIONS=0", "/GR-", "/fp:fast"]
[tool_requires]
!cmake/*: cmake/[>=4.2]

23
profiles/msvcd Normal file
View File

@@ -0,0 +1,23 @@
[settings]
os=Windows
arch=x86_64
compiler=msvc
compiler.version=195
compiler.cppstd=20
compiler.cstd=17
compiler.runtime=dynamic
build_type=Debug
[conf]
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_remove_ehsc.cmake
tools.build:exelinkflags=[]
tools.build:sharedlinkflags=[]
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary"]
&:tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/W4", "/WX", "/fp:fast"]
&:tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary", "/W4", "/WX", "/EHs-", "/D_HAS_EXCEPTIONS=0", "/GR-", "/fp:fast"]
[tool_requires]
!cmake/*: cmake/[>=4.2]