|
2 | 2 | "version": 6, |
3 | 3 | "configurePresets": [ |
4 | 4 | { |
5 | | - "name": "dev", |
6 | | - "displayName": "Developer build (Linux/macOS)", |
7 | | - "description": "RelWithDebInfo, native tuning, compile-commands for tooling", |
8 | | - "binaryDir": "${sourceDir}/build/${presetName}", |
9 | | - "condition": { |
10 | | - "type": "notEquals", |
11 | | - "lhs": "${hostSystemName}", |
12 | | - "rhs": "Windows" |
13 | | - }, |
| 5 | + "name": "base", |
| 6 | + "hidden": true, |
14 | 7 | "cacheVariables": { |
15 | | - "CMAKE_BUILD_TYPE": "RelWithDebInfo", |
16 | | - "CMAKE_CXX_FLAGS": "-march=native", |
17 | | - "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" |
| 8 | + "BUILD_SHARED_LIBS": "OFF" |
18 | 9 | } |
19 | 10 | }, |
20 | 11 | { |
21 | | - "name": "dev-msvc", |
22 | | - "displayName": "Developer build (Windows/MSVC)", |
23 | | - "description": "RelWithDebInfo with AVX2, compile-commands for tooling", |
| 12 | + "name": "dev", |
| 13 | + "inherits": "base", |
| 14 | + "displayName": "Developer build", |
| 15 | + "description": "RelWithDebInfo with compile-commands for tooling. AVX2/native tuning is applied per dev target (see examples/ and tests/, which pick /arch:AVX2 for MSVC and -march=native otherwise), so this preset is correct for MSVC, GCC, Clang and MinGW on any OS.", |
24 | 16 | "binaryDir": "${sourceDir}/build/${presetName}", |
25 | | - "condition": { |
26 | | - "type": "equals", |
27 | | - "lhs": "${hostSystemName}", |
28 | | - "rhs": "Windows" |
29 | | - }, |
30 | 17 | "cacheVariables": { |
31 | 18 | "CMAKE_BUILD_TYPE": "RelWithDebInfo", |
32 | | - "CMAKE_CXX_FLAGS": "/arch:AVX2", |
33 | 19 | "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" |
34 | 20 | } |
35 | 21 | }, |
36 | 22 | { |
37 | 23 | "name": "ci", |
38 | | - "displayName": "CI build", |
| 24 | + "inherits": "base", |
| 25 | + "displayName": "CI build (MSVC/default)", |
39 | 26 | "description": "Release build without machine-specific tuning", |
40 | 27 | "binaryDir": "${sourceDir}/build/${presetName}", |
41 | 28 | "cacheVariables": { |
42 | 29 | "CMAKE_BUILD_TYPE": "Release", |
43 | 30 | "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" |
44 | 31 | } |
| 32 | + }, |
| 33 | + { |
| 34 | + "name": "ci-gcc", |
| 35 | + "inherits": "ci", |
| 36 | + "displayName": "CI build (GCC)", |
| 37 | + "binaryDir": "${sourceDir}/build/${presetName}", |
| 38 | + "cacheVariables": { |
| 39 | + "CMAKE_C_COMPILER": "gcc", |
| 40 | + "CMAKE_CXX_COMPILER": "g++" |
| 41 | + } |
| 42 | + }, |
| 43 | + { |
| 44 | + "name": "ci-clang", |
| 45 | + "inherits": "ci", |
| 46 | + "displayName": "CI build (Clang)", |
| 47 | + "binaryDir": "${sourceDir}/build/${presetName}", |
| 48 | + "cacheVariables": { |
| 49 | + "CMAKE_C_COMPILER": "clang", |
| 50 | + "CMAKE_CXX_COMPILER": "clang++" |
| 51 | + } |
45 | 52 | } |
46 | 53 | ], |
47 | 54 | "buildPresets": [ |
48 | 55 | { |
49 | 56 | "name": "dev", |
50 | | - "configurePreset": "dev" |
51 | | - }, |
52 | | - { |
53 | | - "name": "dev-msvc", |
54 | | - "configurePreset": "dev-msvc", |
| 57 | + "configurePreset": "dev", |
55 | 58 | "configuration": "RelWithDebInfo" |
56 | 59 | }, |
57 | 60 | { |
58 | 61 | "name": "ci", |
59 | 62 | "configurePreset": "ci", |
60 | 63 | "configuration": "Release" |
| 64 | + }, |
| 65 | + { |
| 66 | + "name": "ci-gcc", |
| 67 | + "configurePreset": "ci-gcc", |
| 68 | + "configuration": "Release" |
| 69 | + }, |
| 70 | + { |
| 71 | + "name": "ci-clang", |
| 72 | + "configurePreset": "ci-clang", |
| 73 | + "configuration": "Release" |
| 74 | + } |
| 75 | + ], |
| 76 | + "testPresets": [ |
| 77 | + { |
| 78 | + "name": "ci", |
| 79 | + "configurePreset": "ci", |
| 80 | + "configuration": "Release", |
| 81 | + "output": { |
| 82 | + "outputOnFailure": true |
| 83 | + } |
| 84 | + }, |
| 85 | + { |
| 86 | + "name": "ci-gcc", |
| 87 | + "configurePreset": "ci-gcc", |
| 88 | + "configuration": "Release", |
| 89 | + "output": { |
| 90 | + "outputOnFailure": true |
| 91 | + } |
| 92 | + }, |
| 93 | + { |
| 94 | + "name": "ci-clang", |
| 95 | + "configurePreset": "ci-clang", |
| 96 | + "configuration": "Release", |
| 97 | + "output": { |
| 98 | + "outputOnFailure": true |
| 99 | + } |
61 | 100 | } |
62 | 101 | ] |
63 | 102 | } |
0 commit comments