summaryrefslogtreecommitdiffstats
path: root/src/zstd/build/VS_scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/zstd/build/VS_scripts
parentInitial commit. (diff)
downloadceph-upstream/16.2.11+ds.tar.xz
ceph-upstream/16.2.11+ds.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/zstd/build/VS_scripts')
-rw-r--r--src/zstd/build/VS_scripts/README.md64
-rw-r--r--src/zstd/build/VS_scripts/build.VS2010.cmd7
-rw-r--r--src/zstd/build/VS_scripts/build.VS2012.cmd6
-rw-r--r--src/zstd/build/VS_scripts/build.VS2013.cmd7
-rw-r--r--src/zstd/build/VS_scripts/build.VS2015.cmd7
-rw-r--r--src/zstd/build/VS_scripts/build.VS2017.cmd7
-rw-r--r--src/zstd/build/VS_scripts/build.VS2017Community.cmd7
-rw-r--r--src/zstd/build/VS_scripts/build.VS2017Enterprise.cmd7
-rw-r--r--src/zstd/build/VS_scripts/build.VS2017Professional.cmd7
-rw-r--r--src/zstd/build/VS_scripts/build.generic.cmd62
10 files changed, 181 insertions, 0 deletions
diff --git a/src/zstd/build/VS_scripts/README.md b/src/zstd/build/VS_scripts/README.md
new file mode 100644
index 000000000..6ccaca788
--- /dev/null
+++ b/src/zstd/build/VS_scripts/README.md
@@ -0,0 +1,64 @@
+Command line scripts for Visual Studio compilation without IDE
+==============================================================
+
+Here are a few command lines for reference :
+
+### Build with Visual Studio 2013 for msvcr120.dll
+
+Running the following command will build both the `Release Win32` and `Release x64` versions:
+```batch
+build.VS2013.cmd
+```
+The result of each build will be in the corresponding `bin\Release\{ARCH}\` folder.
+
+If you want to only need one architecture:
+- Win32: `build.generic.cmd VS2013 Win32 Release v120`
+- x64: `build.generic.cmd VS2013 x64 Release v120`
+
+If you want a Debug build:
+- Win32: `build.generic.cmd VS2013 Win32 Debug v120`
+- x64: `build.generic.cmd VS2013 x64 Debug v120`
+
+### Build with Visual Studio 2015 for msvcr140.dll
+
+Running the following command will build both the `Release Win32` and `Release x64` versions:
+```batch
+build.VS2015.cmd
+```
+The result of each build will be in the corresponding `bin\Release\{ARCH}\` folder.
+
+If you want to only need one architecture:
+- Win32: `build.generic.cmd VS2015 Win32 Release v140`
+- x64: `build.generic.cmd VS2015 x64 Release v140`
+
+If you want a Debug build:
+- Win32: `build.generic.cmd VS2015 Win32 Debug v140`
+- x64: `build.generic.cmd VS2015 x64 Debug v140`
+
+### Build with Visual Studio 2015 for msvcr120.dll
+
+This capability is offered through `build.generic.cmd` using proper arguments:
+
+**For Win32**
+```batch
+build.generic.cmd VS2015 Win32 Release v120
+```
+The result of the build will be in the `bin\Release\Win32\` folder.
+
+**For x64**
+```batch
+build.generic.cmd VS2015 x64 Release v120
+```
+The result of the build will be in the `bin\Release\x64\` folder.
+
+If you want Debug builds, replace `Release` with `Debug`.
+
+### Build with Visual Studio 2017
+
+`build.VS2017.cmd`, contributed by [@HaydnTrigg](https://github.com/HaydnTrigg),
+will build both the `Release Win32` and `Release x64` versions
+of the first VS2017 variant it finds, in this priority order :
+Enterprise > Professional > Community
+
+Alternatively, it's possible to target a specific version,
+using appropriate script, such as `build.VS2017Enterprise.cmd` for example.
diff --git a/src/zstd/build/VS_scripts/build.VS2010.cmd b/src/zstd/build/VS_scripts/build.VS2010.cmd
new file mode 100644
index 000000000..c3bc1763e
--- /dev/null
+++ b/src/zstd/build/VS_scripts/build.VS2010.cmd
@@ -0,0 +1,7 @@
+@echo off
+
+rem build 32-bit
+call "%~p0%build.generic.cmd" VS2010 Win32 Release v100
+
+rem build 64-bit
+call "%~p0%build.generic.cmd" VS2010 x64 Release v100 \ No newline at end of file
diff --git a/src/zstd/build/VS_scripts/build.VS2012.cmd b/src/zstd/build/VS_scripts/build.VS2012.cmd
new file mode 100644
index 000000000..d7399a9d6
--- /dev/null
+++ b/src/zstd/build/VS_scripts/build.VS2012.cmd
@@ -0,0 +1,6 @@
+@echo off
+
+rem build 32-bit
+call "%~p0%build.generic.cmd" VS2012 Win32 Release v110
+rem build 64-bit
+call "%~p0%build.generic.cmd" VS2012 x64 Release v110 \ No newline at end of file
diff --git a/src/zstd/build/VS_scripts/build.VS2013.cmd b/src/zstd/build/VS_scripts/build.VS2013.cmd
new file mode 100644
index 000000000..486ba6cf0
--- /dev/null
+++ b/src/zstd/build/VS_scripts/build.VS2013.cmd
@@ -0,0 +1,7 @@
+@echo off
+
+rem build 32-bit
+call "%~p0%build.generic.cmd" VS2013 Win32 Release v120
+
+rem build 64-bit
+call "%~p0%build.generic.cmd" VS2013 x64 Release v120 \ No newline at end of file
diff --git a/src/zstd/build/VS_scripts/build.VS2015.cmd b/src/zstd/build/VS_scripts/build.VS2015.cmd
new file mode 100644
index 000000000..abc41c9a0
--- /dev/null
+++ b/src/zstd/build/VS_scripts/build.VS2015.cmd
@@ -0,0 +1,7 @@
+@echo off
+
+rem build 32-bit
+call "%~p0%build.generic.cmd" VS2015 Win32 Release v140
+
+rem build 64-bit
+call "%~p0%build.generic.cmd" VS2015 x64 Release v140 \ No newline at end of file
diff --git a/src/zstd/build/VS_scripts/build.VS2017.cmd b/src/zstd/build/VS_scripts/build.VS2017.cmd
new file mode 100644
index 000000000..a810faa53
--- /dev/null
+++ b/src/zstd/build/VS_scripts/build.VS2017.cmd
@@ -0,0 +1,7 @@
+@echo off
+
+rem build 32-bit
+call "%~p0%build.generic.cmd" VS2017 Win32 Release v141
+
+rem build 64-bit
+call "%~p0%build.generic.cmd" VS2017 x64 Release v141 \ No newline at end of file
diff --git a/src/zstd/build/VS_scripts/build.VS2017Community.cmd b/src/zstd/build/VS_scripts/build.VS2017Community.cmd
new file mode 100644
index 000000000..133e1b456
--- /dev/null
+++ b/src/zstd/build/VS_scripts/build.VS2017Community.cmd
@@ -0,0 +1,7 @@
+@echo off
+
+rem build 32-bit
+call "%~p0%build.generic.cmd" VS2017Community Win32 Release v141
+
+rem build 64-bit
+call "%~p0%build.generic.cmd" VS2017Community x64 Release v141 \ No newline at end of file
diff --git a/src/zstd/build/VS_scripts/build.VS2017Enterprise.cmd b/src/zstd/build/VS_scripts/build.VS2017Enterprise.cmd
new file mode 100644
index 000000000..6a7093205
--- /dev/null
+++ b/src/zstd/build/VS_scripts/build.VS2017Enterprise.cmd
@@ -0,0 +1,7 @@
+@echo off
+
+rem build 32-bit
+call "%~p0%build.generic.cmd" VS2017Enterprise Win32 Release v141
+
+rem build 64-bit
+call "%~p0%build.generic.cmd" VS2017Enterprise x64 Release v141 \ No newline at end of file
diff --git a/src/zstd/build/VS_scripts/build.VS2017Professional.cmd b/src/zstd/build/VS_scripts/build.VS2017Professional.cmd
new file mode 100644
index 000000000..d183519df
--- /dev/null
+++ b/src/zstd/build/VS_scripts/build.VS2017Professional.cmd
@@ -0,0 +1,7 @@
+@echo off
+
+rem build 32-bit
+call "%~p0%build.generic.cmd" VS2017Professional Win32 Release v141
+
+rem build 64-bit
+call "%~p0%build.generic.cmd" VS2017Professional x64 Release v141 \ No newline at end of file
diff --git a/src/zstd/build/VS_scripts/build.generic.cmd b/src/zstd/build/VS_scripts/build.generic.cmd
new file mode 100644
index 000000000..a7ca4d067
--- /dev/null
+++ b/src/zstd/build/VS_scripts/build.generic.cmd
@@ -0,0 +1,62 @@
+@echo off
+
+IF "%1%" == "" GOTO display_help
+
+SETLOCAL
+
+SET msbuild_version=%1
+
+SET msbuild_platform=%2
+IF "%msbuild_platform%" == "" SET msbuild_platform=x64
+
+SET msbuild_configuration=%3
+IF "%msbuild_configuration%" == "" SET msbuild_configuration=Release
+
+SET msbuild_toolset=%4
+
+GOTO build
+
+:display_help
+
+echo Syntax: build.generic.cmd msbuild_version msbuild_platform msbuild_configuration msbuild_toolset
+echo msbuild_version: VS installed version (VS2012, VS2013, VS2015, VS2017, ...)
+echo msbuild_platform: Platform (x64 or Win32)
+echo msbuild_configuration: VS configuration (Release or Debug)
+echo msbuild_toolset: Platform Toolset (v100, v110, v120, v140, v141)
+
+EXIT /B 1
+
+:build
+
+SET msbuild="%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
+SET msbuild_vs2017community="%programfiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
+SET msbuild_vs2017professional="%programfiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
+SET msbuild_vs2017enterprise="%programfiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
+IF %msbuild_version% == VS2013 SET msbuild="%programfiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
+IF %msbuild_version% == VS2015 SET msbuild="%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
+IF %msbuild_version% == VS2017Community SET msbuild=%msbuild_vs2017community%
+IF %msbuild_version% == VS2017Professional SET msbuild=%msbuild_vs2017professional%
+IF %msbuild_version% == VS2017Enterprise SET msbuild=%msbuild_vs2017enterprise%
+IF %msbuild_version% == VS2017 (
+ IF EXIST %msbuild_vs2017community% SET msbuild=%msbuild_vs2017community%
+ IF EXIST %msbuild_vs2017professional% SET msbuild=%msbuild_vs2017professional%
+ IF EXIST %msbuild_vs2017enterprise% SET msbuild=%msbuild_vs2017enterprise%
+)
+
+SET project="%~p0\..\VS2010\zstd.sln"
+
+SET msbuild_params=/verbosity:minimal /nologo /t:Clean,Build /p:Platform=%msbuild_platform% /p:Configuration=%msbuild_configuration%
+IF NOT "%msbuild_toolset%" == "" SET msbuild_params=%msbuild_params% /p:PlatformToolset=%msbuild_toolset%
+
+SET output=%~p0%bin
+SET output="%output%/%msbuild_configuration%/%msbuild_platform%/"
+SET msbuild_params=%msbuild_params% /p:OutDir=%output%
+
+echo ### Building %msbuild_version% project for %msbuild_configuration% %msbuild_platform% (%msbuild_toolset%)...
+echo ### Build Params: %msbuild_params%
+
+%msbuild% %project% %msbuild_params%
+IF ERRORLEVEL 1 EXIT /B 1
+echo # Success
+echo # OutDir: %output%
+echo #