From 8474cfc8f0d8d701c9030d0cbced4c7c4a259a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Sun, 28 Apr 2024 19:00:14 +0200 Subject: [PATCH] presets --- CMakePresets.json | 169 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 CMakePresets.json diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..b25881c --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,169 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 21, + "patch": 0 + }, + "configurePresets": [ + { + "name": "macos-x86_64", + "displayName": "MacOS x86_64 Release", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/macos-x86_64-release", + "cacheVariables": { + "CMAKE_OSX_ARCHITECTURES": "x86_64", + "CMAKE_CXX_FLAGS": "-stdlib=libc++", + "CMAKE_BUILD_TYPE": "Release", + "OSR_MIMALLOC": "ON" + } + }, + { + "name": "macos-arm64", + "displayName": "MacOS ARM64 Release", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/macos-arm64-release", + "cacheVariables": { + "CMAKE_OSX_ARCHITECTURES": "arm64", + "CMAKE_CXX_FLAGS": "-stdlib=libc++", + "BOOST_CONTEXT_ARCHITECTURE": "arm64", + "BOOST_CONTEXT_ABI": "aapcs", + "ENABLE_ASM": "OFF", + "CMAKE_BUILD_TYPE": "Release", + "OSR_MIMALLOC": "ON" + } + }, + { + "name": "linux-amd64-release", + "displayName": "Linux AMD64 Release", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/amd64-release", + "toolchainFile": "/opt/x86_64-multilib-linux-musl/toolchain-amd64.cmake", + "cacheVariables": { + "CMAKE_EXE_LINKER_FLAGS": "-B/opt/mold", + "CMAKE_BUILD_TYPE": "Release", + "OSR_MIMALLOC": "ON" + }, + "environment": { + "PATH": "/opt:/opt/cmake-3.26.3-linux-x86_64/bin:/opt/buildcache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + } + }, + { + "name": "linux-arm64-release", + "displayName": "Linux ARM64 Release", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/arm64-release", + "toolchainFile": "/opt/aarch64-unknown-linux-musl/toolchain-arm64.cmake", + "cacheVariables": { + "CMAKE_CROSSCOMPILING_EMULATOR": "qemu-aarch64-static", + "CMAKE_EXE_LINKER_FLAGS": "-B/opt/mold", + "CMAKE_BUILD_TYPE": "Release", + "OSR_MIMALLOC": "ON" + }, + "environment": { + "PATH": "/opt:/opt/cmake-3.26.3-linux-x86_64/bin:/opt/buildcache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + } + }, + { + "name": "linux-sanitizer", + "displayName": "Linux Sanitizer", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/sanitizer", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_C_COMPILER": "clang-16", + "CMAKE_CXX_COMPILER": "clang++-16", + "CMAKE_C_FLAGS": "-fsanitize=address,undefined -fno-omit-frame-pointer", + "CMAKE_CXX_FLAGS": "-stdlib=libc++ -fsanitize=address,undefined -fno-omit-frame-pointer", + "CMAKE_EXE_LINKER_FLAGS": "-lc++abi -fuse-ld=/opt/mold/ld" + }, + "environment": { + "PATH": "/opt:/opt/cmake-3.26.3-linux-x86_64/bin:/opt/buildcache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "CXX": "/usr/bin/g++-11", + "CC": "/usr/bin/gcc-11" + } + }, + { + "name": "linux-debug", + "displayName": "Linux Debug", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_EXE_LINKER_FLAGS": "-B/opt/mold" + }, + "environment": { + "PATH": "/opt:/opt/cmake-3.26.3-linux-x86_64/bin:/opt/buildcache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "CXX": "/usr/bin/g++-11", + "CC": "/usr/bin/gcc-11" + } + }, + { + "name": "linux-relwithdebinfo", + "displayName": "Linux RelWithDebInfo", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/relwithdebinfo", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "CMAKE_EXE_LINKER_FLAGS": "-B/opt/mold" + }, + "environment": { + "PATH": "/opt:/opt/cmake-3.26.3-linux-x86_64/bin:/opt/buildcache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "CXX": "/usr/bin/g++-11", + "CC": "/usr/bin/gcc-11" + } + }, + { + "name": "clang-tidy", + "displayName": "Clang Tidy", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/clang-tidy", + "cacheVariables": { + "CMAKE_C_COMPILER": "clang-16", + "CMAKE_CXX_COMPILER": "clang++-16", + "CMAKE_CXX_FLAGS": "-stdlib=libc++", + "CMAKE_EXE_LINKER_FLAGS": "-lc++abi", + "CMAKE_BUILD_TYPE": "Release", + "OSR_LINT": "On" + }, + "environment": { + "BUILDCACHE_LUA_PATH": "/opt/buildcache/share/lua-examples", + "PATH": "/opt:/opt/cmake-3.26.3-linux-x86_64/bin:/opt/buildcache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + } + } + ], + "buildPresets": [ + { + "name": "macos-x86_64", + "configurePreset": "macos-x86_64" + }, + { + "name": "macos-arm64", + "configurePreset": "macos-arm64" + }, + { + "name": "linux-amd64-release", + "configurePreset": "linux-amd64-release" + }, + { + "name": "linux-arm64-release", + "configurePreset": "linux-arm64-release" + }, + { + "name": "clang-tidy", + "configurePreset": "clang-tidy" + }, + { + "name": "linux-debug", + "configurePreset": "linux-debug" + }, + { + "name": "linux-relwithdebinfo", + "configurePreset": "linux-relwithdebinfo" + }, + { + "name": "linux-sanitizer", + "configurePreset": "linux-sanitizer" + } + ] +}