I have the CMakeUserPreset.json:
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 25,
"patch": 0
},
"configurePresets": [
{
"name": "dev",
"displayName": "developer Ninja build on macos with Coverage",
"inherits": ["ci-darwin", "coverage-darwin"],
"generator": "Ninja"
}
],
"buildPresets": [
{
"name": "dev",
"configurePreset": "dev",
"configuration": "Coverage"
}
],
"testPresets": [
{
"name": "dev",
"configurePreset": "dev",
"configuration": "Coverage",
"output": {
"outputOnFailure": true
}
}
] ,
"workflowPresets": [
{
"name": "dev",
"steps": [
{
"type": "configure",
"name": "dev"
},
{
"type": "build",
"name": "dev"
},
{
"type": "test",
"name": "dev"
}
]
}
]
}
The ci-darwin (Release build)
should be overwritten by coverage-darwin
!
But the result is this:
bash-3.2$ cmake --workflow --preset dev --fresh
Executing workflow step 1 of 3: configure preset "dev"
Preset CMake variables:
CMAKE_BUILD_TYPE="Release"
CMAKE_CXX_EXTENSIONS="OFF"
CMAKE_CXX_FLAGS="-fstack-protector-strong -fcf-protection=full -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wcast-qual -Wformat=2 -Wundef -Werror=float-equal -Wshadow -Wcast-align -Wunused -Wnull-dereference -Wdouble-promotion -Wimplicit-fallthrough -Wextra-semi -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast"
CMAKE_CXX_FLAGS_COVERAGE="-Og -g --coverage"
CMAKE_CXX_STANDARD="17"
CMAKE_CXX_STANDARD_REQUIRED="ON"
CMAKE_EXE_LINKER_FLAGS_COVERAGE="--coverage"
CMAKE_SHARED_LINKER_FLAGS_COVERAGE="--coverage"
ENABLE_COVERAGE="ON"
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Configuring done (2.1s)
-- Generating done (0.0s)
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE
ENABLE_COVERAGE
-- Build files have been written to: /Users/clausklein/Workspace/cpp/cmake-init-shared-static/build/coverage
Executing workflow step 2 of 3: build preset "dev"
[2/2] Linking CXX static library libshared.a
Executing workflow step 3 of 3: test preset "dev"
Test project /Users/clausklein/Workspace/cpp/cmake-init-shared-static/build/coverage
No tests were found!!!
bash-3.2$