Skip to content

Commit

Permalink
Remove remnants of C++11 (#2125)
Browse files Browse the repository at this point in the history
  • Loading branch information
externl authored May 7, 2024
1 parent 6002b49 commit 5ec7f36
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 73 deletions.
31 changes: 8 additions & 23 deletions cpp/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Ice has dependencies on a number of third-party libraries:
- [bzip2][3] 1.0
- [expat][4] 2.1 or later
- [libedit][12] (Linux and macOS)
- [LMDB][5] 0.9 (LMDB is not required with the C++11 mapping)
- [LMDB][5] 0.9
- [mcpp][6] 2.7.2 with patches
- [OpenSSL][7] 1.0.0 or later (on AIX and Linux)

Expand Down Expand Up @@ -171,12 +171,7 @@ make V=1 -j8 srcs
```

The build system supports specifying additional preprocessor, compiler and
linker options with the `CPPFLAGS`, `CXXFLAGS` and `LDFLAGS` variables. For
example, to build the Ice C++98 mapping with `-std=c++11`, you can use:

```shell
make CXXFLAGS=-std=c++11
```
linker options with the `CPPFLAGS`, `CXXFLAGS` and `LDFLAGS` variables.

To build the test suite using a binary distribution use:

Expand All @@ -189,7 +184,7 @@ where the C++ compiler can automatically find the header and library files, you
need to set `ICE_HOME`

```shell
make ICE_HOME=/opt/Ice-3.7.10 ICE_BIN_DIST=all
make ICE_HOME=/opt/Ice-3.8.0 ICE_BIN_DIST=all
```

### Build configurations and platforms
Expand All @@ -216,8 +211,7 @@ configurations. The [Ice Builder for Xcode][13] must be installed before buildin
the SDKs:

```shell
make CONFIGS=xcodesdk -j8 srcs # Build the C++98 mapping Xcode SDK
make CONFIGS=cpp11-xcodesdk -j8 srcs # Build the C++11 mapping Xcode SDK
make CONFIGS=xcodesdk -j8 srcs # Build the C++ Xcode SDK
```

The Xcode SDKs are built into `ice/sdk`.
Expand Down Expand Up @@ -302,29 +296,20 @@ The solution provide a project for each Ice component and each component can be
built separately. When you build a component its dependencies are built
automatically.

The solutions organize the projects in two solution folders, C++11 and C++98, which
correspond to the C++11 and C++98 mappings. If you want to build all the C++11 mapping
components, build the C++11 solution folder; likewise if you want to build all
the C++98 mapping components, build the C++98 solution folder.

The test suite is built using separate Visual Studio solutions:

- Ice Test Suite [msbuild/ice.test.sln](./msbuild/ice.test.sln)
- Ice OpenSSL Test Suite [msbuild/ice.openssl.test.sln](./msbuild/ice.openssl.test.sln)

The solution provides a separate project for each test component, the
`Cpp11-Release` and `Cpp11-Debug` build configurations are setup to use the
C++11 mapping in release and debug mode respectively, and are only supported
with Visual Studio 2019, Visual Studio 2017 and Visual Studio 2015. The
`Release` and `Debug` build configurations are setup to use the C++98 mapping in
release and debug mode respectively.
The solution provides a separate project for each test component. the
`Release` and `Debug` build configurations are setup build release and debug mode
respectively.

The building of the test uses by default the local source build, and you must
have built the Ice source with the same platform and configuration than you are
attempting to build the tests.

For example to build the `Cpp11-Release/x64` tests you must have built first the
C++11 mapping using `Release/x64`.
For example to build the `Release/x64` tests you must have built the C++ mapping using `Release/x64`.

It is also possible to build the tests using a C++ binary distribution, to do
that you must set the `ICE_BIN_DIST` environment variable to `all` before
Expand Down
6 changes: 3 additions & 3 deletions cpp/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ice for C++

[Getting started C++11] | [Examples C++11] | [Getting started C++98] | [Examples C++98] | [NuGet packages] | [Documentation] | [Building from source]
[Getting started] | [Examples] | [NuGet packages] | [Documentation] | [Building from source]

The [Ice framework] provides everything you need to build networked applications,
including RPC, pub/sub, server deployment, and more.
Expand Down Expand Up @@ -110,8 +110,8 @@ public:
}
```
[Getting started with Ice C++]: https://doc.zeroc.com/ice/3.8/hello-world-application/writing-an-ice-application-with-c++
[C++ Examples]: https://github.com/zeroc-ice/ice-demos/tree/3.8/cpp
[Getting started]: https://doc.zeroc.com/ice/3.8/hello-world-application/writing-an-ice-application-with-c++
[Examples]: https://github.com/zeroc-ice/ice-demos/tree/3.8/cpp
[NuGet packages]: https://www.nuget.org/packages?q=zeroc.ice.v
[Documentation]: https://doc.zeroc.com/ice/3.8
[Building from source]: https://github.com/zeroc-ice/ice/blob/3.8/cpp/BUILDING.md
Expand Down
13 changes: 4 additions & 9 deletions cpp/msbuild/zeroc.ice.v143.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
<IceConfiguration Condition="'$(UseDebugLibraries)' != 'true'">Release</IceConfiguration>
<LocalDebuggerEnvironment Condition="'$(LocalDebuggerEnvironment)' == ''">PATH=$(MSBuildThisFileDirectory)bin\$(Platform)\$(IceConfiguration)</LocalDebuggerEnvironment>
<IceDllDebugSuffix Condition="'$(IceConfiguration)' == 'Debug'">d</IceDllDebugSuffix>
<IceDLLSuffix Condition="'$(IceCppMapping)' == 'cpp11'">37++11$(IceDllDebugSuffix)</IceDLLSuffix>
<IceDLLSuffix Condition="'$(IceCppMapping)' == 'cpp98'">37$(IceDllDebugSuffix)</IceDLLSuffix>
<IceDLLSuffix>37$(IceDllDebugSuffix)</IceDLLSuffix>
</PropertyGroup>

<ItemGroup>
<_Ice_DLLs_v143 Include="$(MSBuildThisFileDirectory)bin\$(Platform)\$(IceConfiguration)\*$(IceDLLSuffix).dll"
Exclude="$(MSBuildThisFileDirectory)bin\$(Platform)\$(IceConfiguration)\icedb37*.dll"/>
<_Ice_DLLs_v143 Include="$(MSBuildThisFileDirectory)bin\$(Platform)\$(IceConfiguration)\*$(IceDLLSuffix).dll" Exclude="$(MSBuildThisFileDirectory)bin\$(Platform)\$(IceConfiguration)\icedb37*.dll"/>
<_Ice_DLLs_v143 Include="$(MSBuildThisFileDirectory)bin\$(Platform)\$(IceConfiguration)\libssl*.dll"/>
<_Ice_DLLs_v143 Include="$(MSBuildThisFileDirectory)bin\$(Platform)\$(IceConfiguration)\libcrypto*.dll"/>
<_Ice_DLLs_v143 Include="$(MSBuildThisFileDirectory)bin\$(Platform)\$(IceConfiguration)\bzip2*.dll"/>
Expand All @@ -30,13 +28,10 @@
</ItemDefinitionGroup>

<Target Name="ValidateSliceCompilerVersion" BeforeTargets="CLCompile">
<Error Text="Detected invalid Ice NuGet package version '$(IceNugetPackageVersion)' expected '3.8a0'"
Condition="'$(IceNugetPackageVersion)' != '3.8a0'" />
<Error Text="Detected invalid Ice NuGet package version '$(IceNugetPackageVersion)' expected '3.8a0'" Condition="'$(IceNugetPackageVersion)' != '3.8a0'" />
</Target>

<Target Name="Ice_CopyDLLs_v143" AfterTargets="Build" Condition="'$(PlatformToolset)' == 'v143' and '$(Ice_CopyDLLs)' == 'Yes'">
<Copy SourceFiles="@(_Ice_DLLs_v143)"
DestinationFolder="$(OutDir)"
SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(_Ice_DLLs_v143)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true"/>
</Target>
</Project>
8 changes: 3 additions & 5 deletions cpp/src/Ice/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,10 @@ namespace

case OperationMode::Idempotent:
return "::Ice::Idempotent";
default:
assert(false);
return "";
}
//
// This could not happen with C++11 strong type enums
//
assert(false);
return "";
}
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/ThreadPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ IceInternal::ThreadPool::initialize()

#if defined(__APPLE__)
//
// We use a default stack size of 1MB on macOS and the new C++11 mapping to allow transmitting
// We use a default stack size of 1MB on macOS. The C++ mapping allows transmitting
// class graphs with a depth of 100 (maximum default), 512KB is not enough otherwise.
//
int defaultStackSize = 1024 * 1024; // 1MB
Expand Down
8 changes: 4 additions & 4 deletions cpp/test/Ice/scope/AllTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ allTests(Test::TestHelper* helper)
}

//
// C++11 Callback-Based Async Function
// Callback-Based Async Function
//
{
Test::IPrx i(communicator, "i1:" + helper->getTestEndpoint());
Expand Down Expand Up @@ -476,7 +476,7 @@ allTests(Test::TestHelper* helper)
}

//
// C++11 Callback-Based Async Function
// Callback-Based Async Function
//
{
Test::Inner::Inner2::IPrx i(communicator, "i2:" + helper->getTestEndpoint());
Expand Down Expand Up @@ -737,7 +737,7 @@ allTests(Test::TestHelper* helper)
}

//
// C++11 Callback-Based Async Function
// Callback-Based Async Function
//
{
Test::Inner::IPrx i(communicator, "i3:" + helper->getTestEndpoint());
Expand Down Expand Up @@ -998,7 +998,7 @@ allTests(Test::TestHelper* helper)
}

//
// C++11 Callback-Based Async Function
// Callback-Based Async Function
//
{
Inner::Test::Inner2::IPrx i(communicator, "i4:" + helper->getTestEndpoint());
Expand Down
2 changes: 1 addition & 1 deletion man/man1/slice2cpp.1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ is defined during this compilation.

Full documentation for slice2cpp is available online at:
.br
https://doc.zeroc.com/ice/latest/language-mappings/c++11-mapping/slice2cpp-command-line-options
https://doc.zeroc.com/ice/latest/language-mappings/c++-mapping/slice2cpp-command-line-options

.SH OPTIONS

Expand Down
53 changes: 27 additions & 26 deletions matlab/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ This document describes how to build and install Ice for MATLAB from source.
ZeroC provides Ice for MATLAB [toolboxes][1] for MATLAB on Windows and Linux, so building Ice for MATLAB from source is
usually unnecessary.

* [Building Ice for MATLAB on Windows](#building-ice-for-matlab-on-windows)
* [Prerequisites](#prerequisites)
* [Build Instructions](#build-instructions)
* [Packaging the Ice Toolbox](#packaging-the-ice-toolbox)
* [Building Ice for MATLAB on Linux](#building-ice-for-matlab-on-linux)
* [Prerequisites](#prerequisites-1)
* [Build Instructions](#build-instructions-1)
* [Using Ice for MATLAB](#using-ice-for-matlab)
* [Search Path](#search-path)
* [Slice Files](#slice-files)
* [Loading the Library](#loading-the-library)
* [Running the Tests](#running-the-tests)
- [Ice for MATLAB Build Instructions](#ice-for-matlab-build-instructions)
- [Building Ice for MATLAB on Windows](#building-ice-for-matlab-on-windows)
- [Prerequisites](#prerequisites)
- [Build Instructions](#build-instructions)
- [Packaging the Ice Toolbox](#packaging-the-ice-toolbox)
- [Building Ice for MATLAB on Linux](#building-ice-for-matlab-on-linux)
- [Prerequisites](#prerequisites-1)
- [Build Instructions](#build-instructions-1)
- [Using Ice for MATLAB](#using-ice-for-matlab)
- [Search Path](#search-path)
- [Slice Files](#slice-files)
- [Loading the Library](#loading-the-library)
- [Running the Tests](#running-the-tests)

## Building Ice for MATLAB on Windows

Expand Down Expand Up @@ -48,12 +49,12 @@ msbuild msbuild\ice.proj /p:Configuration=Debug

Upon completion, a build in release mode generates the following components:

* Ice for C++11 libraries, located in `cpp\bin\x64\Release`
* slice2matlab executable, located in `cpp\bin\x64\Release`
* ice.mexw64 MEX file, located in `matlab\lib\x64\Release`
* Prototype and thunk files, located in `matlab\lib\x64\Release`
* MATLAB code for core Slice files, located in `matlab\lib\generated`
* MATLAB code for test Slice files, located in `matlab\test\**\generated`
- Ice for C++ libraries, located in `cpp\bin\x64\Release`
- slice2matlab executable, located in `cpp\bin\x64\Release`
- ice.mexw64 MEX file, located in `matlab\lib\x64\Release`
- Prototype and thunk files, located in `matlab\lib\x64\Release`
- MATLAB code for core Slice files, located in `matlab\lib\generated`
- MATLAB code for test Slice files, located in `matlab\test\**\generated`

The MATLAB extension depends on Ice for C++ components from the `cpp`
subdirectory, and those are built if required. It is also possible to build the
Expand Down Expand Up @@ -82,13 +83,13 @@ You can install the toolbox from within MATLAB by double-clicking on the file.

The build system requires MATLAB 2017b or MATLAB 2019b for Linux, with a supported C++ compiler and a Perl installation.

* Use GCC 4.9 for 2017b, see [MATLAB 2017b supported compilers][2].
* Use GCC 6.3 for 2019b, see [MATLAB 2019b supported compilers][3].
- Use GCC 4.9 for 2017b, see [MATLAB 2017b supported compilers][2].
- Use GCC 6.3 for 2019b, see [MATLAB 2019b supported compilers][3].

We recommend using the following build environments:

* Ubuntu 16.04 (Xenial) with g++-4.9 compiler, for MATLAB 2017b.
* Debian 9 (Stretch) with the default g++ compiler, for MATLAB 2019b.
- Ubuntu 16.04 (Xenial) with g++-4.9 compiler, for MATLAB 2017b.
- Debian 9 (Stretch) with the default g++ compiler, for MATLAB 2019b.

### Build Instructions

Expand Down Expand Up @@ -131,10 +132,10 @@ CXX=g++-4.9

To use a source build, add the following directories to your MATLAB path:

* `matlab\lib`
* `matlab\lib\generated`
* `matlab\lib\x64\Release` (only on Windows platforms)
* `matlab\lib\x86_64-linux-gnu` (only on Linux platforms)
- `matlab\lib`
- `matlab\lib\generated`
- `matlab\lib\x64\Release` (only on Windows platforms)
- `matlab\lib\x86_64-linux-gnu` (only on Linux platforms)

### Slice Files

Expand Down
2 changes: 1 addition & 1 deletion swift/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def create_platform_targets(project, platform, bindist)
target.add_dependency(ice_cpp_target)
end
}
target_set_common_build_settings(target, "#{component}++11#{platform_name}", platform)
target_set_common_build_settings(target, "#{component}#{platform_name}", platform)

source_dirs = cpp_source_dirs[component] || [component]
source_dirs.each do |d|
Expand Down

0 comments on commit 5ec7f36

Please sign in to comment.