diff --git a/BuildRel.bat b/BuildRel.bat new file mode 100644 index 0000000..00edb77 --- /dev/null +++ b/BuildRel.bat @@ -0,0 +1,34 @@ +@echo off +setlocal enabledelayedexpansion + +where conan >nul 2>nul +if errorlevel 1 ( + echo conan not installed, pip install conan + pause + exit /b 1 +) + +conan install . -s build_type=Release --build=missing +if errorlevel 1 ( + echo install package failed. + pause + exit /b 1 +) + +call %~dp0build\Release\generators\conanbuild.bat +cmake --preset=conan-release +if errorlevel 1 ( + echo config failed. + cd .. + pause + exit /b 1 +) +cmake --build --preset=conan-release +if errorlevel 1 ( + echo build failed. + cd .. + pause + exit /b 1 +) +echo build success. +pause \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 5feb30c..14e80d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) if (MSVC) add_compile_options(/utf-8) + add_compile_options(/EHsc) add_definitions(-DWIN32_LEAN_AND_MEAN) add_definitions(-D_WIN32_WINNT=0x0601) add_definitions(-D_CRT_SECURE_NO_WARNINGS)