mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Added Windows build scripts using Build Tools for Visual Studio 2022 (MSVC compiler & CMake) and Conan package manager
- Included Dockerfile to automate the setup process of prerequisites and build of libModSecurity binaries.
This commit is contained in:
28
vcbuild.bat
Normal file
28
vcbuild.bat
Normal file
@@ -0,0 +1,28 @@
|
||||
@rem For Windows build information, see build\win32\README.md
|
||||
|
||||
@echo off
|
||||
pushd %CD%
|
||||
|
||||
if not "%1"=="" (set build_type=%1) else (set build_type=Release)
|
||||
echo Build type: %build_type%
|
||||
|
||||
if not "%2"=="" (set arch=%2) else (set arch=x86_64)
|
||||
echo Arch: %arch%
|
||||
|
||||
if "%3"=="USE_ASAN" (
|
||||
echo Address Sanitizer: Enabled
|
||||
set CI_ASAN=-c tools.build:cxxflags="[""/fsanitize=address""]"
|
||||
set ASAN_FLAG=ON
|
||||
) else (
|
||||
echo Address Sanitizer: Disabled
|
||||
set CI_ASAN=
|
||||
set ASAN_FLAG=OFF
|
||||
)
|
||||
|
||||
cd build\win32
|
||||
conan install . -s compiler.cppstd=17 %CI_ASAN% --output-folder=build --build=missing --settings=build_type=%build_type% --settings=arch=%arch%
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DUSE_ASAN=%ASAN_FLAG%
|
||||
cmake --build . --config %build_type%
|
||||
|
||||
popd
|
Reference in New Issue
Block a user