Last active
February 25, 2016 08:35
-
-
Save KindDragon/fb85ec81184a096953f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal | |
| set VS_VERSION=14 2015 | |
| set TOOLSET_VERSION=-T "v140" | |
| rem RelWithDebInfo configuration do many problems in solution, allow creating pdb for Release configuration | |
| set CMAKE_PARAMS=-D CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release -D CMAKE_CXX_FLAGS_RELEASE:STRING="/MD /Zi /O2 /D NDEBUG" -D CMAKE_C_FLAGS_RELEASE:STRING="/MD /Zi /O2 /D NDEBUG" -D CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING="/DEBUG /INCREMENTAL:NO" -D CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING="/DEBUG /INCREMENTAL:NO" -D CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="/DEBUG /INCREMENTAL:NO" | |
| set CMAKE_OUTPUT_DIRS_WIN32=-D CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:STRING=%~dp0\_result\Win32_Debug\lib\ -D CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG:STRING=%~dp0\_result\Win32_Debug\lib -D CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG:STRING=%~dp0\_result\Win32_Debug\bin^ | |
| -D CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:STRING=%~dp0\_result\Win32_Release\lib\ -D CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE:STRING=%~dp0\_result\Win32_Release\lib -D CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE:STRING=%~dp0\_result\Win32_Release\bin | |
| set CMAKE_OUTPUT_DIRS_X64=-D CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:STRING=%~dp0\_result\x64_Debug\lib\ -D CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG:STRING=%~dp0\_result\x64_Debug\lib -D CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG:STRING=%~dp0\_result\x64_Debug\bin^ | |
| -D CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:STRING=%~dp0\_result\x64_Release\lib\ -D CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE:STRING=%~dp0\_result\x64_Release\lib -D CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE:STRING=%~dp0\_result\x64_Release\bin | |
| mkdir _build | |
| cd _build | |
| mkdir Win32 | |
| cd Win32 | |
| cmake -G "Visual Studio %VS_VERSION%" %TOOLSET_VERSION% %CMAKE_PARAMS% %CMAKE_OUTPUT_DIRS_WIN32% ..\.. | |
| if errorlevel 1 goto exit_build | |
| cmake --build . --config "Debug" | |
| if errorlevel 1 goto exit_build | |
| cmake --build . --config "Release" | |
| if errorlevel 1 goto exit_build | |
| cd .. | |
| mkdir x64 | |
| cd x64 | |
| cmake -G "Visual Studio %VS_VERSION% Win64" %TOOLSET_VERSION% %CMAKE_PARAMS% %CMAKE_OUTPUT_DIRS_X64% ..\.. | |
| if errorlevel 1 goto exit_build | |
| cmake --build . --config "Debug" | |
| if errorlevel 1 goto exit_build | |
| cmake --build . --config "Release" | |
| if errorlevel 1 goto exit_build | |
| cd .. | |
| cd .. | |
| :exit_build | |
| cd ../.. | |
| exit /b 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment