Skip to content

Commit

Permalink
Handle C++ standard for MSVC with Conan better
Browse files Browse the repository at this point in the history
When the "cpp_std" and "msvc_cpp_std" values are the same, there is no
need to generate the conditional in conan-ci-setup.sh that would clamp
the value to 14 if the user requested C++11.
  • Loading branch information
friendlyanon committed Mar 9, 2024
1 parent ff48153 commit d1354bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake-init/templates/common/.github/scripts/conan-ci-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ pip3 install conan!=2.1.0

conan profile detect -f

std={= cpp_std =}
std={= cpp_std =}{% if cpp_std != msvc_cpp_std %}
if [ "$RUNNER_OS" = Windows ]; then
std={= msvc_cpp_std =}
fi

{% end %}
profile="$(conan profile path default)"

mv "$profile" "${profile}.bak"
Expand Down

0 comments on commit d1354bf

Please sign in to comment.