diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ce9278d..c2c9cb00 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,7 +71,7 @@ jobs: - name: Build run: | conan install . -of build --build missing - cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=".\build\conan_toolchain.cmake" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded + cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=".\build\conan_toolchain.cmake -DMSVC_STATIC=ON cmake --build ./build --config Release -j12 - name: Unittests run: .\build\bin\Release\unittests.exe diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f40e607..4573af06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,9 @@ if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() -if(MSVC) +option(MSVC_STATIC "Use static runtime libraries with MSVC" OFF) + +if(MSVC AND MSVC_STATIC) add_compile_options( $<$:/MT> $<$:/MTd> diff --git a/README.md b/README.md index 37c8813a..136c01c9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -[![CI](https://github.com/ThoSe1990/cucumber-cpp/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/ThoSe1990/cucumber-cpp/actions/workflows/main.yml) [![Build Status](https://dev.azure.com/thomassedlmair/cwt-cucumber/_apis/build/status%2FThoSe1990.cwt-cucumber?branchName=main)](https://dev.azure.com/thomassedlmair/cwt-cucumber/_build/latest?definitionId=14&branchName=main) - +[![CI](https://github.com/ThoSe1990/cucumber-cpp/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/ThoSe1990/cucumber-cpp/actions/workflows/main.yml) ## Coding With Thomas Cucumber: A C++ Cucumber Interpreter diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 9bccf63e..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,35 +0,0 @@ -# trigger: -# - 'main' -# -# jobs: -# - job: WindowsBuild -# pool: -# vmImage: 'windows-latest' -# steps: -# - script: | -# choco install python3 -y -# py.exe -m pip install cmake -# py.exe -m pip install conan -# displayName: Install CMake, Conan -# # for now it does its job ... i know the hardcoded paths are ugly... -# - script: | -# set PATH=%PATH%;C:\hostedtoolcache\windows\Python\3.12.7\x64\Scripts -# conan --version # Now you can use Conan -# conan profile detect -# powershell -Command "(gc C:\Users\VssAdministrator\.conan2\profiles\default) -replace 'compiler.cppstd=14', 'compiler.cppstd=20' | Out-File -encoding ASCII C:\Users\VssAdministrator\.conan2\profiles\default" -# powershell -Command "(gc C:\Users\VssAdministrator\.conan2\profiles\default) -replace 'compiler.runtime=dynamic', 'compiler.runtime=static' | Out-File -encoding ASCII C:\Users\VssAdministrator\.conan2\profiles\default" -# displayName: 'Init Conan' -# - script: | -# set PATH=%PATH%;C:\hostedtoolcache\windows\Python\3.12.7\x64\Scripts -# conan install . -of build --build missing -# cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=".\build\conan_toolchain.cmake" -# cmake --build ./build --config Release -j6 -# displayName: 'Win Release Build' -# - script: | -# .\build\bin\Release\unittests.exe -# displayName: 'Run Unittests' -# - script: | -# dir .\build\bin\Release -# .\build\bin\Release\example.exe -# .\build\bin\Release\example.exe ./examples/features -# displayName: 'Run example'