Author: chug
Date: Fri Jun 6 15:30:37 2014
New Revision: 1600924
URL: http://svn.apache.org/r1600924
Log:
PROTON-596: Add cmake configure_file to customize config.bat for windows builds.
1. Cmake on windows produces all four cmake configurations (debug,
relwithdebinfo, ...) on one pass. Producing N config.bat files, one for each
configuration, seems like overkill. The build produces just one config.bat that
that is set up for RelWithDebInfo.
2. The prototype bash file config.sh does several conditional tests for sensing
the build and changing the environment accordingly. The windows version
flattens these tests out and forces the settings every time. It's easier to
understand this way and requires a lot less testing for proof. Only the Python
binding has been exercised; Ruby, Perl, and PHP not so much.
3. A typical 32-bit VS2010 run:
> mkdir build
> mkdir install
> cd build
> call "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" x86
> cmake -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX=../install ..
> devenv proton.sln /build "RelWithDebInfo|Win32" /project INSTALL
> devenv proton.sln /build "Debug|Win32" /project INSTALL
> call config.bat
> ctest -VV
There is one python test that fails regularly (out of 282).
Modified:
qpid/proton/trunk/CMakeLists.txt
qpid/proton/trunk/config.bat.in
Modified: qpid/proton/trunk/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/qpid/proton/trunk/CMakeLists.txt?rev=1600924&r1=1600923&r2=1600924&view=diff
==============================================================================
--- qpid/proton/trunk/CMakeLists.txt (original)
+++ qpid/proton/trunk/CMakeLists.txt Fri Jun 6 15:30:37 2014
@@ -152,3 +152,9 @@ if (JAVA_FOUND AND MAVEN_EXE)
else (JAVA_FOUND AND MAVEN_EXE)
message (STATUS "Cannot find both Java and Maven: testing disabled for
Proton-J")
endif (JAVA_FOUND AND MAVEN_EXE)
+
+# Generate test environment settings
+if (WIN32)
+ configure_file(${CMAKE_HOME_DIRECTORY}/config.bat.in
+ ${CMAKE_BINARY_DIR}/config.bat @ONLY)
+endif (WIN32)
\ No newline at end of file
Modified: qpid/proton/trunk/config.bat.in
URL:
http://svn.apache.org/viewvc/qpid/proton/trunk/config.bat.in?rev=1600924&r1=1600923&r2=1600924&view=diff
==============================================================================
--- qpid/proton/trunk/config.bat.in (original)
+++ qpid/proton/trunk/config.bat.in Fri Jun 6 15:30:37 2014
@@ -17,54 +17,50 @@ REM specific language governing permissi
REM under the License.
REM
-REM HACK ALERT: This script supports debug builds in $PROTON_HOME\build only.
+REM This is a generated file and will be overwritten the next
+REM time that cmake is run.
-set PROTON_HOME=%~dp0
-set PROTON_HOME=%PROTON_HOME:~0,-1%
+REM This build may be one of @CMAKE_CONFIGURATION_TYPES@
+REM Choose the configuration this script should reference:
+SET PROTON_BUILD_CONFIGURATION=relwithdebinfo
-if "%CPROTON_BUILD%"=="" (
- if EXIST %PROTON_HOME%\build\proton-c (
- set PROTON_BINDINGS=%PROTON_HOME%\build\proton-c\bindings
- ) else (
- set PROTON_BINDINGS=%PROTON_HOME%\proton-c\bindings
- )
- if EXIST %PROTON_HOME%\build\proton-j (
- set PROTON_JARS=%PROTON_HOME%\build\proton-j\proton-j.jar
- ) else (
- set PROTON_JARS=%PROTON_HOME%\proton-j\proton-j.jar
- )
-) else (
- set PROTON_BINDINGS=%CPROTON_BUILD%\bindings
-)
-echo PROTON_BINDINGS = %PROTON_BINDINGS%
+REM PROTON_HOME is the root of the proton checkout
+REM PROTON_BUILD is where cmake was run
+
+set PROTON_HOME=@CMAKE_HOME_DIRECTORY@
+set PROTON_BUILD=@CMAKE_BINARY_DIR@
+
+set PROTON_HOME=%PROTON_HOME:/=\%
+set PROTON_BUILD=%PROTON_BUILD:/=\%
+
+set PROTON_BINDINGS=%PROTON_BUILD%\proton-c\bindings
+set PROTON_JARS=%PROTON_BUILD%\proton-j\proton-j.jar
REM Python & Jython
set PYTHON_BINDINGS=%PROTON_BINDINGS%\python
-set
COMMON_PYPATH=%PROTON_HOME%\tests\python:%PROTON_HOM%\proton-c\bindings\python
-set PYTHONPATH=%COMMON_PYPATH%:%PYTHON_BINDINGS%
-set
JYTHONPATH=%COMMON_PYPATH%:%PROTON_HOM%\proton-j\src\main\resources:%PROTON_JARS%
+set
COMMON_PYPATH=%PROTON_HOME%\tests\python;%PROTON_HOME%\proton-c\bindings\python
+set PYTHONPATH=%COMMON_PYPATH%;%PYTHON_BINDINGS%
+set
JYTHONPATH=%COMMON_PYPATH%;%PROTON_HOME%\proton-j\src\main\resources;%PROTON_JARS%
set CLASSPATH=%PROTON_JARS%
REM PHP
set PHP_BINDINGS=%PROTON_BINDINGS%\php
if EXIST %PHP_BINDINGS% (
- echo include_path="%PHP_BINDINGS%:%PROTON_HOME%\proton-c\bindings\php" >
%PHP_BINDINGS%\php.ini
+ echo include_path="%PHP_BINDINGS%;%PROTON_HOME%\proton-c\bindings\php" >
%PHP_BINDINGS%\php.ini
echo extension="%PHP_BINDINGS%\cproton.so" >>
%PHP_BINDINGS%\php.ini
set PHPRC=%PHP_BINDINGS%\php.ini
)
REM Ruby
set RUBY_BINDINGS=%PROTON_BINDINGS%\ruby
-set
RUBYLIB=%RUBY_BINDINGS%:%PROTON_HOME%\proton-c\bindings\ruby\lib:%PROTON_HOME%\tests\ruby
+set
RUBYLIB=%RUBY_BINDINGS%;%PROTON_HOME%\proton-c\bindings\ruby\lib;%PROTON_HOME%\tests\ruby
REM Perl
set PERL_BINDINGS=%PROTON_BINDINGS%\perl
-set
PERL5LIB=%PERL5LIB%:%PERL_BINDINGS%:%PROTON_HOME%\proton-c\bindings\perl\lib
-
-REM test applications
-if EXIST %PROTON_HOME%\build\tests\tools\apps\c set
PATH=%PATH%;%PROTON_HOME%\build\tests\tools\apps\c
-
-if EXIST %PROTON_HOME%\tests\tools\apps\python set
PATH=%PATH%;%PROTON_HOME%\tests\tools\apps\python
+set
PERL5LIB=%PERL5LIB%;%PERL_BINDINGS%;%PROTON_HOME%\proton-c\bindings\perl\lib
REM test applications
-set PATH=%PATH%;%PROTON_HOME%\tests\python;%PROTON_HOME%\build\proton-c\debug
+set PATH=%PATH%;%PROTON_BUILD%\tests\tools\apps\c
+set PATH=%PATH%;%PROTON_HOME%\tests\tools\apps\python
+set PATH=%PATH%;%PROTON_HOME%\tests\python
+set PATH=%PATH%;%PROTON_BUILD%\proton-c\%PROTON_BUILD_CONFIGURATION%
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]