Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/Build.cmd @ 15806

Last change on this file since 15806 was 15682, checked in by swagner, 7 years ago

#2887: moved content of trunk/sources to trunk

  • Property svn:mergeinfo set to (toggle deleted branches)
    /stable/Build.cmdmergedeligible
    /branches/1721-RandomForestPersistence/Build.cmd10321-10322
    /branches/Algorithms.GradientDescent/Build.cmd5516-5520
    /branches/Async/Build.cmd13329-15286
    /branches/Benchmarking/sources/Build.cmd6917-7005
    /branches/CloningRefactoring/Build.cmd4656-4721
    /branches/CodeEditor/Build.cmd11700-11806
    /branches/DataAnalysis Refactoring/Build.cmd5471-5808
    /branches/DataAnalysis SolutionEnsembles/Build.cmd5815-6180
    /branches/DataAnalysis/Build.cmd4458-4459,​4462,​4464
    /branches/DataPreprocessing/Build.cmd10085-11101
    /branches/GP.Grammar.Editor/Build.cmd6284-6795
    /branches/GP.Symbols (TimeLag, Diff, Integral)/Build.cmd5060
    /branches/HLScript/Build.cmd10331-10358
    /branches/HeuristicLab.DatasetRefactor/sources/Build.cmd11570-12508
    /branches/HeuristicLab.Problems.DataAnalysis.Trading/Build.cmd6123-9799
    /branches/HeuristicLab.Problems.Orienteering/Build.cmd11130-12721
    /branches/HiveStatistics/sources/Build.cmd12440-12877
    /branches/LogResidualEvaluator/Build.cmd10202-10483
    /branches/NET40/sources/Build.cmd5138-5162
    /branches/NSGA-II Changes/Build.cmd12033-12122
    /branches/ParallelEngine/Build.cmd5175-5192
    /branches/ProblemInstancesRegressionAndClassification/Build.cmd7568-7810
    /branches/QAPAlgorithms/Build.cmd6350-6627
    /branches/Restructure trunk solution/Build.cmd6828
    /branches/RuntimeOptimizer/Build.cmd8943-9078
    /branches/ScatterSearch (trunk integration)/Build.cmd7787-8333
    /branches/SlaveShutdown/Build.cmd8944-8956
    /branches/SpectralKernelForGaussianProcesses/Build.cmd10204-10479
    /branches/SuccessProgressAnalysis/Build.cmd5370-5682
    /branches/Trunk/Build.cmd6829-6865
    /branches/UnloadJobs/Build.cmd9168-9215
    /branches/VNS/Build.cmd5594-5752
    /branches/crossvalidation-2434/Build.cmd12948-12950
    /branches/histogram/Build.cmd5959-6341
    /branches/symbreg-factors-2650/Build.cmd14232-14825
File size: 2.6 KB
RevLine 
[4863]1@ECHO OFF
2
[7594]3SET CLEANBEFOREBUILD=
[4919]4
5SET SELECTED=
6SET CONFIGURATION=
7SET PLATFORM=
8
9IF "%~1"=="" GOTO :prompt_solution
10
11SET SELECTED=%1
12IF NOT EXIST %SELECTED% (
13  ECHO Solution file %SELECTED% could not be found.
14  GOTO :end
15)
16ECHO Building solution %SELECTED% ...
17GOTO :config_selection
18
19:prompt_solution
[4863]20SET /A COUNT=0
21FOR /F "tokens=*" %%A IN ('dir /B *.sln') DO (
[4919]22  CALL :forloopbody "%%A"
23)
[4863]24
[4873]25IF "%COUNT%"=="1" (
26  SET SELECTED=%SOLUTIONS.1%
27  ECHO Building %SOLUTIONS.1% as it is the only solution that was found ...
[4919]28  GOTO :config_selection
29)
[4873]30
[4863]31ECHO Found the following solutions:
32FOR /F "tokens=2* delims=.=" %%A IN ('SET SOLUTIONS.') DO ECHO %%A = %%B
33ECHO.
[4919]34SET /P SOLUTIONINDEX=Which solution to build? Type the number:
[4863]35
36SET SELECTED=""
37FOR /F "tokens=2* delims=.=" %%A IN ('SET SOLUTIONS.') DO (
[4919]38  IF "%%A"=="%SOLUTIONINDEX%" SET SELECTED=%%B
39)
[4863]40
41IF %SELECTED%=="" GOTO :eof
42
[4919]43:config_selection
44IF "%~2"==""  GOTO :prompt_config
45
46SET CONFIGURATION=%~2
47ECHO Building configuration %CONFIGURATION% ...
48GOTO :platform_selection
49
50:prompt_config
[7087]51SET /P CONFIGURATION=Which configuration to build [Release]:
52IF "%CONFIGURATION%"=="" SET CONFIGURATION=Release
[4919]53
54:platform_selection
55IF "%~3"=="" GOTO :prompt_platform
56 
57SET PLATFORM=%~3
58ECHO Building platform %PLATFORM% ...
[7594]59GOTO :clean
[4919]60
61:prompt_platform
[4863]62SET /P PLATFORM=Which platform to build [Any CPU]:
63IF "%PLATFORM%"=="" SET PLATFORM=Any CPU
64
[7594]65:clean
66IF "%~4"=="" GOTO :prompt_clean
67
68SET CLEANBEFOREBUILD=%~4
69GOTO :main
70
71:prompt_clean
72SET /P CLEANBEFOREBUILD=Would you like to clean before building [n]:
73IF "%CLEANBEFOREBUILD%"=="" SET CLEANBEFOREBUILD=n
74
[4919]75:main
[4863]76REM First find the path to the msbuild.exe by performing a registry query
[4873]77FOR /F "tokens=1,3 delims=   " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"') DO (
78  IF "%%A"=="MSBuildToolsPath" SET MSBUILDPATH=%%B)
[4863]79
80REM Then execute msbuild to clean and build the solution
81REM Disable that msbuild creates a cache file of the solution
82SET MSBuildUseNoSolutionCache=1
83REM Run msbuild to clean and then build
[7594]84IF "%CLEANBEFOREBUILD%" NEQ "n" (
[4922]85  ECHO Cleaning ...
[4924]86  %MSBUILDPATH%msbuild.exe %SELECTED% /target:Clean /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /m:2 /nologo /verbosity:q /clp:ErrorsOnly
[4919]87)
[4922]88ECHO Building ...
[7594]89%MSBUILDPATH%msbuild.exe %SELECTED% /target:Build /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /m:2 /nologo /verbosity:q /clp:ErrorsOnly
[4863]90
[4922]91ECHO.
92ECHO DONE.
93
[4919]94:end
95
[4863]96PAUSE
97
98GOTO :eof
99
100REM This workaround is necessary so that COUNT gets reevaluated
101:forloopbody
102SET /A COUNT+=1
103SET SOLUTIONS.%COUNT%=%1
[4924]104GOTO :eof
Note: See TracBrowser for help on using the repository browser.