Skip to content

Commit 5926d25

Browse files
author
Michiel Beemster
committed
Add VS2017 support
1 parent fb21485 commit 5926d25

File tree

15 files changed

+225
-76
lines changed

15 files changed

+225
-76
lines changed

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "submods/MPC_ROOT"]
22
path = submods/MPC_ROOT
3-
url = git://github.com/PrismTech/MPC_ROOT.git
3+
url = git://github.com/ADLINK-IST/MPC_ROOT.git

bin/checkconf

+122-71
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,21 @@ function setVSEnv()
6868
;;
6969
esac
7070

71-
local cmd=$(printf "cmd /V /C cd %s && vcvarsall.bat %s 1>NUL && echo LIB=!LIB! && echo INCLUDE=!INCLUDE! && echo PATH=!PATH! && echo FrameworkSDKDir=!FrameworkSDKDir! && echo WindowsSdkDir=!WindowsSdkDir!" "$1" "$ARCH")
71+
local cmd
72+
# Repository can be located on a different drive than the system drive, in
73+
# order to make the command below work in that scenario, first switch to
74+
# the drive on which Program Files is located.
75+
local drv=$(echo "${VS_HOME}" | perl -ne 'print "$1$2" if (m#^(?:([a-z]):|/cygdrive/([a-z])/)#i)')
76+
77+
#needed to check if we have a VS > 2015 as the vsvarsall.bat has been renamed to VsDevCmd.bat
78+
vsvarscheck="${VS_HOME}/VC/vcvarsall.bat"
79+
if [ -f "$vsvarscheck" ]; then
80+
local cmd=$(printf "cmd /V /C %s: && cd %s && vcvarsall.bat %s 1>NUL && echo LIB=!LIB! && echo INCLUDE=!INCLUDE! && echo PATH=!PATH! && echo FrameworkSDKDir=!FrameworkSDKDir! && echo WindowsSdkDir=!WindowsSdkDir!" "$drv" "$1" "$ARCH")
81+
else
82+
vshome_norm=$(cygpath -w $VS_HOME)
83+
vs_gt_2015_path=${vshome_norm}/Common7/Tools/
84+
local cmd=$(printf "cmd /V /C %s: && cd %s && VsDevCmd.bat -arch=%s 1>NUL && echo LIB=!LIB! && echo INCLUDE=!INCLUDE! && echo PATH=!PATH! && echo FrameworkSDKDir=!FrameworkSDKDir! && echo WindowsSdkDir=!WindowsSdkDir!" "$drv" "$vs_gt_2015_path" "$ARCH")
85+
fi
7286

7387
# PATH is converted by cygwin automatically, others are not. Unset them to prevent corruption in case this function is executed more than once
7488
[[ -n "$LIB" ]] && { echo "Warning: LIB already set!"; unset LIB; }
@@ -133,7 +147,7 @@ csharp_check ()
133147
msvs_check ()
134148
{
135149
# VS_VER 19 Windows 10 / VS2015 / .NET framework V4.6 / SDK v10.0A
136-
# VS_VER 18 Windows 8.1 / VS2013 / .NET framework V4.5.2 / SDK 8.1A
150+
# VS_VER 18 Windows 8.1 / VS2013 / .NET framework V4.5.1 / SDK 8.1A
137151
# VS_VER 17 Windows 8 / VS2012 / .NET framework V4.5 / SDK 8.0A
138152
# VS_VER 16 Windows 7 / VS2010 / .NET framework V4.0.30319 / SDK 7.0A
139153
# VS_VER 15 Windows Vista / VS2008 / .NET framework V3.5 / SDK 6.0A
@@ -162,21 +176,64 @@ msvs_check ()
162176
# needed for installer names
163177
if [ "$VS_VER" == "14" ]; then
164178
VS_YEAR=2005
179+
DOTNET="3.0"
165180
elif [ "$VS_VER" == "15" ]; then
166181
VS_YEAR=2008
182+
DOTNET="3.5"
167183
elif [ "$VS_VER" == "16" ]; then
168184
VS_YEAR=2010
185+
DOTNET="4.0"
169186
elif [ "$VS_VER" == "17" ]; then
170187
VS_YEAR=2012
188+
DOTNET="4.5"
171189
elif [ "$VS_VER" == "18" ]; then
172190
VS_YEAR=2013
173-
elif [ "$VS_VER" == "19" ]; then
191+
DOTNET="4.5.1"
192+
elif [[ $OSPL_COMPILER_VER == "19.0"* ]]; then
174193
VS_YEAR=2015
194+
DOTNET="4.6"
195+
elif [[ $OSPL_COMPILER_VER == "19.1"* ]]; then
196+
VS_YEAR=2017
197+
DOTNET="4.6.1"
175198
else
176199
VS_YEAR=Unknown
200+
DOTNET="Unknown"
177201
fi
202+
178203
set_var VS_YEAR "$VS_YEAR"
179-
echo "OK - using compiler version: $COMPILER_VER for VS: $VS_YEAR"
204+
set_var DOTNET "$DOTNET"
205+
# from VS 2015 update 3 and above C11 is enabled so enable it for the build too.
206+
if [ $VS_VER -gt 18 ]
207+
then
208+
set_var OSPL_USE_CXX11 "yes"
209+
fi
210+
211+
212+
# only generate an AssemblyAttributes for vs2010 and newer lower is not supported
213+
if [ $VS_VER -gt 15 ]
214+
then
215+
sed -e "s;%DOTNET%;$DOTNET;g" $OSPL_HOME/src/api/dcps/sacs/AssemblyAttributesTemplate.cs > $OSPL_HOME/src/api/dcps/sacs/code/DDS/AssemblyAttributes.cs
216+
fi
217+
218+
DOTNETPROGFILES=$PROGRAMFILES
219+
220+
case ${SPLICE_HOST} in
221+
x86_64.*)
222+
DOTNETPROGFILES="C:\\Program Files (x86)"
223+
;;
224+
esac
225+
226+
#fallback for when the host is 32 bit but the actual platform is 64 bit
227+
if [[ "$PROCESSOR_ARCHITECTURE" == "AMD64" ]]; then
228+
DOTNETPROGFILES="C:\\Program Files (x86)"
229+
fi
230+
231+
if [[ "$PROCESSOR_ARCHITEW6432" == "AMD64" ]]; then
232+
DOTNETPROGFILES="C:\\Program Files (x86)"
233+
fi
234+
set_var DOTNETPROGFILES "$DOTNETPROGFILES"
235+
236+
echo "OK - using compiler version: $COMPILER_VER for VS: $VS_YEAR and .Net $DOTNET and Program Files $DOTNETPROGFILES"
180237
fi
181238

182239

@@ -218,57 +275,65 @@ gcc_check ()
218275
{
219276
echo -n "GCC: "
220277
pathcheck gcc
221-
if [ $? != 0 ]
222-
then
278+
if [ $? != 0 ]; then
223279
echo "ERROR - Not found"
224280
return 1
225281
fi
226282

227283
GCC_FULLVERSION=`gcc -dumpversion`
228284
GCC_MAJOR=`echo $GCC_FULLVERSION | cut -f 1 -d .`
229-
if [ $GCC_MAJOR -lt 3 ]
230-
then
231-
echo "ERROR - Only gcc 3.2 and above is supported"
232-
return 1
233-
fi
234-
235285
GCC_MINOR=`echo $GCC_FULLVERSION | cut -f 2 -d .`
236-
if [ $GCC_MAJOR -eq 3 -a $GCC_MINOR -lt 2 ]
237-
then
238-
echo "ERROR - Only gcc 3.2 and above is supported"
286+
export GCC_MAJOR GCC_MINOR
287+
288+
# GCC < 3.2 not supported
289+
if echo $GCC_FULLVERSION | gawk '{ exit $1 < 3.2 ? 0 : 1 }'; then
290+
echo "ERROR - Only GCC >= 3.2 is supported (found: $GCC_FULLVERSION)"
239291
return 1
240292
fi
241-
# -Werror=switch supported by gcc >= 4.2
242-
# -Wconversion changed in 4.3 and we want the new one, but it gives too many false positives in 4.3
243-
GCC_WERROR_IS_SWITCH_SUPPORT=`echo $GCC_FULLVERSION | gawk '{ print $1>="4.2"?"1":"0"}'`
244-
GCC_WCONVERSION_IS_SUPPORTED=`echo $GCC_FULLVERSION | gawk '{ print $1>="4.4"?"1":"0"}'`
293+
294+
echo "OK - Using version $GCC_FULLVERSION"
295+
296+
# GCC >= 4.2 supports -Werror=switch
297+
GCC_WERROR_IS_SWITCH_SUPPORT=`echo $GCC_FULLVERSION | gawk '{ print $1 >= 4.2 ? 1 : 0 }'`
245298
set_var GCC_WERROR_IS_SWITCH_SUPPORT "$GCC_WERROR_IS_SWITCH_SUPPORT"
299+
300+
# GCC >= 4.3 supports C++11
301+
GCC_SUPPORTS_CPLUSPLUS11=`echo $GCC_FULLVERSION | gawk '{ print $1 >= 4.3 ? 1 : 0 }'`
302+
set_var GCC_SUPPORTS_CPLUSPLUS11 "$GCC_SUPPORTS_CPLUSPLUS11"
303+
304+
# GCC >= 4.4 supports -Wconversion (too many false positives in 4.3)
305+
GCC_WCONVERSION_IS_SUPPORTED=`echo $GCC_FULLVERSION | gawk '{ print $1 >= 4.4 ? 1 : 0 }'`
246306
set_var GCC_WCONVERSION_IS_SUPPORTED "$GCC_WCONVERSION_IS_SUPPORTED"
247-
export GCC_WERROR_IS_SWITCH_SUPPORT
248-
export GCC_WCONVERSION_IS_SUPPORTED
249-
export GCC_MAJOR GCC_MINOR
250-
echo "OK - using version $GCC_FULLVERSION"
251307

252-
if echo $GCC_FULLVERSION | gawk '{ if($1>="4.3"){exit 0}else{exit 1} }' ; then
253-
set_var GCC_SUPPORTS_CPLUSPLUS11 1
254-
export GCC_SUPPORTS_CPLUSPLUS11
308+
# GCC >= 4.7 supports -flto (except 5.4, due to bug in linker: OSPL-10875)
309+
# Also at GCC >= 4.7 we disable maybe-uninitialized errors for some 3rd party code
310+
if echo $GCC_FULLVERSION | gawk '{ exit $1 >= 4.7 ? 0 : 1 }'; then
311+
case "${GCC_FULLVERSION}" in
312+
5.4*)
313+
;;
314+
*)
315+
echo " NOTE - Enable link-time optimizations (for release build)"
316+
set_var GCC_SUPPORTS_LTO 1
317+
if ! pathcheck gcc-ar; then
318+
echo " WARNING - Unable to find gcc-ar (could result in link errors)"
319+
fi
320+
;;
321+
esac
322+
set_var GCC_HAS_NO_MAYBE_UNINITIALIZED yes
255323
fi
256324

257-
# -flto works well in gcc >= 4.7
258-
if echo $GCC_FULLVERSION | gawk '{ if($1>="4.7"){exit 0}else{exit 1} }' ; then
259-
echo " NOTE - enabling link-time optimizations for release build"
260-
set_var GCC_SUPPORTS_LTO 1
261-
export GCC_SUPPORTS_LTO
262-
pathcheck gcc-ar
263-
if [ $? -ne 0 ]
264-
then
265-
echo " WARNING - unable to find gcc-ar this could result in link errors"
325+
# GCC >= 4.8 supports building Fujitsu system-tests (except when cross-compiling)
326+
if echo $GCC_FULLVERSION | gawk '{ exit $1 >= 4.8 ? 0 : 1 }'; then
327+
if [ ${SPLICE_TARGET} = ${SPLICE_HOST} ]; then
328+
echo " NOTE - Building Fujitsu system-tests"
329+
set_var INCLUDE_FUJITSU_ST_TEST yes
330+
else
331+
echo " NOTE - Not building Fujitsu system-tests (cross-compile not supported)"
266332
fi
267-
268-
# Also at 4.7+ we disable maybe-uninitialized errors for some 3rd party code
269-
set_var GCC_HAS_NO_MAYBE_UNINITIALIZED yes
270-
export GCC_HAS_NO_MAYBE_UNINITIALIZED
333+
else
334+
echo " NOTE - Not building Fujitsu system-tests (requires GCC >= 4.8)"
271335
fi
336+
272337
return 0
273338
}
274339

@@ -363,12 +428,12 @@ qt_check ()
363428
echo -n "Qt: "
364429
if [ "$OSPL_QT_IS_ON" = "no" ]
365430
then
366-
echo "Disabled. OSPL_QT_IS_ON was: no"
431+
echo "Disabled. \$OSPL_QT_IS_ON was: no"
367432
return 0
368433
fi
369434
if [ -n "$QTDIR" ]
370435
then
371-
if [ -f "$QTDIR/bin/uic" ]
436+
if [ -f $QTDIR/bin/uic ]
372437
then
373438
QT_VERSION=`$QTDIR/bin/uic -version 2>&1 | sed 's/\([^0-9][^0-9]*\)\([0-9]\)\([^0-9].*\)/\2/'`
374439
echo "at_check (1) and QT_VERSION is $QT_VERSION"
@@ -401,7 +466,7 @@ qt_check ()
401466
return 1
402467
fi
403468
else
404-
if [ -z "$QTLIBDIR" ]
469+
if [ -z $QTLIBDIR ]
405470
then
406471
linkpath=`ld --verbose | grep SEARCH_DIR | tr ' ' '\n' | sed -e 's/SEARCH_DIR("\=\?\(.*\)");/\1/g'`
407472
for i in $linkpath
@@ -412,12 +477,9 @@ qt_check ()
412477
fi
413478
done
414479
fi
415-
if [ -z "$QTLIBDIR" ]
480+
if [ -z $QTLIBDIR ]
416481
then
417-
echo "Warning - Cannot find Qt libraries. Standalone demo package will not be built."
418-
echo " Please specifiy QTLIBDIR."
419-
set_var OSPL_QT_IS_ON no
420-
return 0
482+
echo "Cannot find Qt libraries. Standalone demo package will not be built. Please specifiy QTLIBDIR."
421483
fi
422484
case `uname` in
423485
CYGWIN_NT*)
@@ -448,7 +510,7 @@ qt_check ()
448510
echo "On. Using QT tools from the path."
449511
set_var OSPL_QT_IS_ON yes
450512
else
451-
echo "Off. Ok, iShapes Demo will not be built"
513+
echo "Off. Ok, but you're missing out on bouncing shapes..."
452514
fi
453515
fi
454516
return 0
@@ -618,13 +680,14 @@ bison_check ()
618680
echo "ERROR - Not found"
619681
return 1
620682
fi
621-
BISON_VERSION=`bison -V 2>/dev/null | head -1`
622-
#BISON_MAJOR=`echo $BISON_VERSION | cut -f 1 -d '.' | cut -f 4 -d ' '`
623-
#if [ $BISON_MAJOR -lt 2 ]
624-
#then
625-
# echo "ERROR - Only bison 2.x and above is supported"
626-
# return 1
627-
#fi
683+
BISON_VERSION=`bison -V 2>/dev/null | head -1 | sed 's/[^0-9.]*\([0-9.]*\).*/\1/'`
684+
BISON_MAJOR=`echo $BISON_VERSION | cut -f 1 -d '.'`
685+
BISON_MINOR=`echo $BISON_VERSION | cut -f 2 -d '.'`
686+
if [ $BISON_MAJOR -lt 3 ] && ! [ $BISON_MAJOR -eq 2 -a $BISON_MINOR -ge 7 ]
687+
then
688+
echo "ERROR - Only bison 2.7 and above is supported"
689+
return 1
690+
fi
628691

629692
echo "OK - using $BISON_VERSION"
630693
return 0
@@ -795,25 +858,10 @@ javac_check ()
795858
then
796859
JAVA_HOME=`echo "$JAVAC_EXE" | sed 's@/bin/javac$@@' `
797860
set_var JAVA_HOME "$JAVA_HOME"
798-
if [ "$JAVAC_VERSION" -ne "$REQUIRED_VERSION" -a ! -f "$JAVA_COMPATJAR" ]
799-
then
800-
if [ "$STRICT_CHECKS" = yes ]
801-
then
802-
echo "ERROR - JAVA_COMPATJAR must point to rt.jar for Java 1.6"
803-
return 1
804-
else
805-
echo "Warning - you should set JAVA_COMPATJAR to rt.jar for Java 1.6"
806-
fi
807-
fi
808861
else
809862
echo "ERROR - Only Oracle JAVA 1.6 and above is supported"
810863
return 1
811864
fi
812-
if [ ! -n "$JAVA_VERSION_OVERRIDE" -a ! -z "$OSPL_OUTER_HOME" -a "$JAVAC_VERSION" -ne "$REQUIRED_VERSION" ]
813-
then
814-
echo "ERROR - Only Oracle JAVA 1.6 is supported"
815-
return 1
816-
fi
817865
else
818866
echo "ERROR - Only Oracle JAVA 1.6 and above is supported"
819867
return 1
@@ -872,7 +920,7 @@ javac_check ()
872920
fi
873921

874922
echo "OK - using JAVAC version $JAVAC_REAL_VERSION"
875-
echo " JAVA_HOME is $JAVA_HOME"
923+
echo " JAVA_HOME is $JAVA_HOME"
876924
return 0
877925
}
878926

@@ -1232,6 +1280,8 @@ c99_check()
12321280

12331281
no_protoc()
12341282
{
1283+
set_var INCLUDE_FUJITSU_ST_TEST no
1284+
export INCLUDE_FUJITSU_ST_TEST
12351285
if [ "$STRICT_CHECKS" = "yes" ]
12361286
then
12371287
# this needs to be to an error before protobuf functionality is released
@@ -1243,6 +1293,7 @@ no_protoc()
12431293
echo "Warning - Protobuf compiler environment not set, building of all protobuf related features is disabled."
12441294
return 0;
12451295
fi
1296+
12461297
}
12471298

12481299
launch4j_check()

build/scripts/overnight/config_runs_opensplice

+6
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,9 @@ E opensplice/win10-64-vor-c/x86_64.win64-release-vs14 30 #First# none
8484

8585
E opensplice/win10-64-vor-d/x86_64.win64-dev-vs14 30 #First# none
8686
E opensplice/win10-64-vor-d/x86_64.win64-release-vs14 30 #First# none
87+
88+
E opensplice/win10-64-ospl-vs17/x86_64.win64-dev-vs17 30 #First# none
89+
E opensplice/win10-64-ospl-vs17/x86_64.win64-release-vs17 30 #First# none
90+
91+
E opensplice/macmini/x86_64.darwin10_clang-dev 25 #First# none
92+
E opensplice/macmini/x86_64.darwin10_clang-release 25 #First# none

build/scripts/overnight/config_runs_opensplice-test

+3
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,8 @@ E opensplice-test/win10-64-vor-c/x86_64.win64-release-vs14 30 #First# none
8585
E opensplice-test/win10-64-vor-d/x86_64.win64-dev-vs14 30 #First# none
8686
E opensplice-test/win10-64-vor-d/x86_64.win64-release-vs14 30 #First# none
8787

88+
E opensplice-test/win10-64-ospl-vs17/x86_64.win64-dev-vs17 30 #First# none
89+
E opensplice-test/win10-64-ospl-vs17/x86_64.win64-release-vs17 30 #First# none
90+
8891
E opensplice-test/macmini/x86_64.darwin10_clang-dev 25 #First# none
8992
E opensplice-test/macmini/x86_64.darwin10_clang-release 25 #First# none
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#export OPENORB_HOME=/home/dds/INSTALLED_FOR_DDS/openorb-v1.4.0
2+
#export OPENORB_VERSION=1.4.0e
3+
#export VS_HOME='/cygdrive/C/Program Files (x86)/Microsoft Visual Studio 14.0'
4+
export VS_HOME='/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/2017/Community'
5+
export WINDOWSSDKDIR='/cygdrive/C/Program Files (x86)/Windows Kits/10'
6+
#export JACORB_HOME=/home/dds/INSTALLED_FOR_DDS/JacORB-v2.3.1.0
7+
export GSOAPHOME=/home/dds/INSTALLED_FOR_DDS/gsoap-2.7
8+
export PROTOBUF_HOME=/home/dds/INSTALLED_FOR_DDS/protobuf-2.6.0
9+
export PROTOBUF_LIB_HOME=/home/dds/INSTALLED_FOR_DDS/protobuf-2.6.0/src
10+
export LAUNCH4J_HOME=/home/dds/INSTALLED_FOR_DDS/Launch4j
11+
export PATH=$PROTOBUF_HOME/bin:$PATH
12+
13+
#There is no TAO for VS2015
14+
unset TAO_ROOT
15+
export OVERRIDE_STRICT_CHECKS=no
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
. ./configs/`hostname`/common
2+
3+
export VS_ENV_SCRIPT=`cygpath -w "${VS_HOME}/Common7/Tools/VsDevCmd.bat"`
4+
5+
export JAVA_HOME="c:/Program Files/Java/jdk1.6.0_45"
6+
export ZLIB_HOME=
7+
export QTDIR=c:\\cygwin\\home\\dds\\INSTALLED_FOR_DDS\\Qt\\4.8.4_vs2010_64bit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
BUILD=yes
2+
SETUP_TYPE=x86_64.win64-dev
3+
BUILD_DIST=yes
4+
BUILD_EXAMPLES=yes
5+
KEEP_DIST=yes
6+
RUN_DBT=no
7+
RUN_RBT=no
8+
RUN_EXAMPLES_SP=yes
9+
RUN_EXAMPLES_SHM=no
10+
VALGRIND=no
11+
12+
. configs/`hostname`/common_64bit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
BUILD=yes
2+
SETUP_TYPE=x86_64.win64-release
3+
BUILD_DIST=yes
4+
BUILD_EXAMPLES=yes
5+
KEEP_DIST=yes
6+
RUN_DBT=no
7+
RUN_RBT=no
8+
RUN_EXAMPLES_SP=yes
9+
RUN_EXAMPLES_SHM=no
10+
VALGRIND=no
11+
12+
. configs/`hostname`/common_64bit

0 commit comments

Comments
 (0)