diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..f6502b7 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,178 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "base", + "displayName": "base preset", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-${presetName}", + "installDir": "$env{KF6}", + "hidden": true + }, + { + "name": "dev", + "displayName": "Build against", + "binaryDir": "${sourceDir}/build", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + }, + "inherits": [ + "base" + ] + }, + { + "name": "unity", + "displayName": "Build with CMake unity support.", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "USE_UNITY_CMAKE_SUPPORT": "ON" + }, + "inherits": [ + "base" + ] + }, + { + "name": "release", + "displayName": "Build as release mode.", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "BUILD_TESTING": "OFF" + }, + "inherits": [ + "base" + ] + }, + { + "name": "dev-mold", + "displayName": "Build as debug + using mold linker", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", + "CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=mold" + }, + "inherits": [ + "base" + ] + }, + { + "name": "asan", + "displayName": "Build with Asan support .", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "ECM_ENABLE_SANITIZERS": "'address;undefined'", + "CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=mold" + }, + "inherits": [ + "base" + ] + }, + { + "name": "dev-clang-asan", + "displayName": "dev-clang-asan", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", + "ECM_ENABLE_SANITIZERS": "'address;undefined'", + "CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=mold" + }, + "environment": { + "CXX": "clang++", + "CCACHE_DISABLE": "ON" + }, + "inherits": [ + "base" + ] + }, + { + "name": "dev-clang", + "displayName": "dev-clang", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", + "CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=mold" + }, + "environment": { + "CXX": "clang++", + "CCACHE_DISABLE": "ON" + }, + "inherits": [ + "base" + ] + }, + { + "name": "ftime-trace", + "displayName": "ftime-trace", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "USE_DEVELOPER_MODE": "ON", + "CMAKE_C_FLAGS_INIT": "-ftime-trace", + "CMAKE_CXX_FLAGS_INIT": "-ftime-trace" + }, + "environment": { + "CC": "/usr/bin/clang", + "CXX": "/usr/bin/clang++", + "CCACHE_DISABLE": "ON" + }, + "inherits": [ + "base" + ] + }, + { + "name": "clazy", + "displayName": "clazy", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + }, + "environment": { + "CXX": "clazy", + "CCACHE_DISABLE": "ON" + }, + "inherits": [ + "base" + ] + } + ], + "buildPresets": [ + { + "name": "dev-clang-asan", + "configurePreset": "dev-clang-asan" + }, + { + "name": "ftime-trace", + "configurePreset": "ftime-trace" + }, + { + "name": "dev-clang", + "configurePreset": "dev-clang" + }, + { + "name": "dev-mold", + "configurePreset": "dev-mold" + }, + { + "name": "dev", + "configurePreset": "dev" + }, + { + "name": "release", + "configurePreset": "release" + }, + { + "name": "asan", + "configurePreset": "asan" + }, + { + "name": "unity", + "configurePreset": "unity" + }, + { + "name": "clazy", + "configurePreset": "clazy", + "environment": { + "CLAZY_CHECKS": "level0,level1,detaching-member,ifndef-define-typo,isempty-vs-count,qrequiredresult-candidates,reserve-candidates,signal-with-return-value,unneeded-cast,function-args-by-ref,function-args-by-value,returning-void-expression,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch,old-style-connect,qstring-allocations,container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,qstring-varargs,level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo,qt6-header-fixes,qt6-qlatin1stringchar-to-u,sanitize-inline-keyword,signal-with-return-value", + "CCACHE_DISABLE": "ON" + } + } + ] +} diff --git a/CMakePresets.json.license b/CMakePresets.json.license new file mode 100644 index 0000000..f9161f7 --- /dev/null +++ b/CMakePresets.json.license @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: 2021-2025 Laurent Montel +# SPDX-License-Identifier: BSD-3-Clause diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt new file mode 100644 index 0000000..0741db7 --- /dev/null +++ b/LICENSES/BSD-3-Clause.txt @@ -0,0 +1,26 @@ +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. 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. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +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 HOLDER 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.