Github user jeking3 commented on a diff in the pull request: https://github.com/apache/thrift/pull/1162#discussion_r97203010 --- Diff: build/wincpp/build-thrift-compiler.bat --- @@ -0,0 +1,80 @@ +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. +:: + +:: +:: Produces a production thrift compiler suitable for redistribution. +:: The compiler is linked to runtime statically for maximum portability. +:: Assumes the thirdparty files for "winflexbison" have been placed +:: according to the README.md instructions. +:: +:: Open a Visual Studio Command Prompt of your choosing and then +:: run this script. + +@ECHO OFF +SETLOCAL EnableDelayedExpansion + +IF NOT DEFINED CMAKE_ROOT SET CMAKE_ROOT=C:\Program Files\CMake +IF NOT DEFINED PACKAGE_NAME SET PACKAGE_NAME=thrift +IF NOT DEFINED PACKAGE_VERSION SET PACKAGE_VERSION=dev +IF NOT DEFINED SOURCE_DIR SET SOURCEDIR=%~dp0%PACKAGE_NAME% +IF NOT DEFINED WIN3P_ROOT SET WIN3P_ROOT=%~dp0thirdparty + +:: Set COMPILER to (vc100 - vc140) depending on the current environment +CALL scripts\cl_setcompiler.bat || EXIT /B + +:: Set ARCH to either win32 or x64 depending on the current environment +CALL scripts\cl_setarch.bat || EXIT /B + +:: Set GENERATOR for CMake depending on the current environment +CALL scripts\cl_setgenerator.bat || EXIT /B + +IF NOT DEFINED BUILDTYPE ( + SET BUILDTYPE=Release +) + + SET BUILDDIR=%~dp0build\%PACKAGE_NAME%-compiler\%PACKAGE_VERSION%\%COMPILER%\ + SET OUTDIR=%~dp0dist\%PACKAGE_NAME%-compiler-%PACKAGE_VERSION%\%COMPILER%\%ARCH%\%BUILDTYPE%\ + SET BOOST_LIBDIR=lib%ARCH:~-2,2%-msvc-%COMPILER:~-3,2%.0 + IF "%BUILDTYPE%" == "Debug" (SET ZLIB_STATIC_SUFFIX=d) + + ECHO/ + ECHO ========================================================================= + ECHO Configuration: %PACKAGE_NAME% %PACKAGE_VERSION% %COMPILER%:%ARCH%:%BUILDTYPE% "%GENERATOR%" +IF DEFINED COMPILERONLY ( + ECHO COMPILER ONLY +) + ECHO Build Directory: %BUILDDIR% + ECHO Install Directory: %OUTDIR% + ECHO Source Directory: %SOURCEDIR% + ECHO ========================================================================= + ECHO/ + + MKDIR "%BUILDDIR%" + CD "%BUILDDIR%" || EXIT /B + + "C:\Program Files\CMake\bin\cmake.exe" %~dp0thrift ^ --- End diff -- This should just be "cmake.exe" and let the path pick it up.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---