Skip to content

Commit

Permalink
Cpp98 removal (#1747)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Feb 2, 2024
1 parent 36dffdc commit 5491f90
Show file tree
Hide file tree
Showing 857 changed files with 6,995 additions and 93,358 deletions.
4 changes: 1 addition & 3 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ runs:
shell: bash
if: runner.os == 'macOS' || runner.os == 'Linux'

- name: Build C++ 11 Tests for Scripting Languages
env:
CONFIGS: "cpp11-shared"
- name: Build C++ Tests for Scripting Languages
run: make -j3 V=1 -C cpp tests
shell: bash
if: (runner.os == 'macOS' || runner.os == 'Linux') && (matrix.language == 'php' || matrix.language == 'js' || matrix.language == 'ruby')
Expand Down
17 changes: 1 addition & 16 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,10 @@ runs:
shell: bash
if: runner.os == 'macOS' || runner.os == 'Linux'

- name: Test C++98
run: python3 allTests.py --debug --all --continue --workers=4 --export-xml=test-report.xml --config=cpp98-shared --languages=cpp --languages=cpp ${{ inputs.flags }}
shell: bash
if: (runner.os == 'macOS' || runner.os == 'Linux') && matrix.language == 'cpp'

- name: Test
run: python allTests.py --debug --all --continue --export-xml=test-report.xml --platform=x64 --config=Cpp11-Release --workers=4 --languages=${{ matrix.language }} ${{ inputs.flags }}
shell: powershell
if: runner.os == 'Windows' && matrix.language != 'python'

- name: Test
run: python allTests.py --debug --all --continue --export-xml=test-report.xml --platform=x64 --config=Release --workers=4 --languages=${{ matrix.language }} ${{ inputs.flags }}
shell: powershell
if: runner.os == 'Windows' && matrix.language == 'python'

- name: Test C++98
run: python allTests.py --debug --all --continue --export-xml=test-report.xml --platform=x64 --config=Release --workers=4 --languages=cpp ${{ inputs.flags }}
shell: powershell
if: runner.os == 'Windows'&& matrix.language == 'cpp'
if: runner.os == 'Windows'

- name: Test Summary
uses: test-summary/action@v2
Expand Down
45 changes: 2 additions & 43 deletions cpp/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,19 +205,6 @@ To build all the supported configurations and platforms:
make CONFIGS=all PLATFORMS=all -j8
```

### C++11 mapping

The C++ source tree supports two different language mappings (C++98 and C++11).
The default build uses the C++98 mapping. The C++11 mapping is a new mapping
that uses new language features.

To build the C++11 mapping, use build configurations that are prefixed with
`cpp11`, for example:

```shell
make CONFIGS=cpp11-shared -j8
```

### Ice Xcode SDK (macOS only)

The build system supports building Xcode SDKs for Ice. These SDKs allow you to
Expand Down Expand Up @@ -375,10 +362,6 @@ When compiling Ice programs, you must pass the location of the
`<prefix>/include` directory to the compiler with the `-I` option, and the
location of the library directory with the `-L` option.

If building a C++11 program, you must define the `ICE_CPP11_MAPPING` macro
during compilation with the `-D` option (`c++ -DICE_CPP11_MAPPING`) and add the
`++11` suffix to the library name when linking (such as `-lIce++11`).

## Creating a NuGet Package on Windows

You can create a NuGet package with the following command:
Expand All @@ -396,7 +379,7 @@ configuration and platform.

To clean the binaries produced for a specific configuration or platform, you
need to specify the `CONFIGS` or `PLATFORMS` variable. For example,
`make CONFIGS=cpp11-shared clean` will clean the C++11 mapping build.
`make CONFIGS=static clean` will clean the static configuration build.

To clean the build for all the supported configurations and platforms, run
`make CONFIGS=all PLATFORMS=all clean`.
Expand All @@ -419,31 +402,7 @@ pip install passlib
After a successful source build, you can run the tests as follows:

```shell
python allTests.py # default config (C++98) and platform
```

For the C++11 mapping, you need to specify a C++11 config:

- Linux/macOS

```shell
python allTests.py --config=cpp11-shared # cpp11-shared config with the default platform
```

- Windows C++11 debug builds

```shell
python allTests.py --config Cpp11-Debug
```

- Windows C++11 release builds

```shell
python allTests.py --config Cpp11-Release
```

If everything worked out, you should see lots of `ok` messages. In case of a
failure, the tests abort with `failed`.
python allTests.py # default config and platform

### iOS

Expand Down
66 changes: 3 additions & 63 deletions cpp/config/Make.rules
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#
# Supported configurations
#
supported-configs = cpp98-shared cpp98-static cpp11-shared cpp11-static
default-configs = cpp11-shared cpp98-shared
supported-configs = shared static
default-configs = shared

-include $(lang_srcdir)/config/Make.rules.$(os)
ifeq ($(os),Darwin)
Expand Down Expand Up @@ -62,73 +62,15 @@ static_projects = test/Common \

static_excludes = test/Ice/library test/Ice/plugin

#
# Components and projects which are built with C++98
#
cpp98_cppflags = -std=c++17
cpp98_projects = %
cpp98_excludes = glacier2router \
icebridge \
icepatch2server icepatch2client icepatch2calc \
icegridnode icegridregistry icegridadmin icegriddb \
IceStormService icestormadmin icestormdb \
IceXML \
IceDB \
test/Glacier2/% \
test/IceBridge/% \
test/IceGrid/% \
test/IceStorm/%

#
# Components and projects which are built with C++11
#
cpp11_components = $(coreandstub_components) \
glacier2router Glacier2CryptPermissionsVerifier \
icebox icebridge \
icepatch2server icepatch2client icepatch2calc \
IceDB \
IceXML \
icegridnode icegridregistry icegridadmin icegriddb \
IceStormService icestormadmin icestormdb \

cpp11_projects = test/Common \
test/IceUtil/% \
test/Slice/% \
test/Ice/% \
test/IceSSL/% \
test/IceDiscovery/% \
test/IceBox/% \
test/IceGrid/% \
test/IceStorm/% \
test/Glacier2/% \
test/IceGrid/% \
test/IceBridge/simple

#
# If building on a Linux multilib platform, we restrict what we build for
# the 32-bits architecture. We basically, build the same set of components
# as C++11 (libraries and icebox executable).
# the 32-bits architecture.
#
ifeq ($(multilib-platform),yes)
x86_components = $(coreandstub_components) IceDB IceStormService icebox
x86_projects = test/%
endif

#
# C++11 configuration to build the C++11 mapping.
#
# Appends cpp11 to the configuration directory name. If we are building the
# target outside the component build directory, we also append the ++11
# suffix to the targetname. This is for example how icebox is compiled as
# icebox++11 when compiled with the C++11 configuration. We also don't add
# the cpp11 name to the target directory if building outside the build
# directory.
#
cpp11_cppflags = -DICE_CPP11_MAPPING
cpp11_ldflags = $(cpp11_cppflags)
cpp11_targetname = $(if $(or $(filter-out $($1_target),program),$(filter $(bindir)%,$($4_targetdir))),++11)
cpp11_targetdir = $(if $(filter %/build,$5),cpp11)

#
# $(call make-cpp-src-project,$1=project)
#
Expand Down Expand Up @@ -168,8 +110,6 @@ $1[static]_dependencies := IceSSL $(if $(IceBT_system_libs),IceBT)
$1[xcodesdk]_dependencies := IceSSL
$1[iphoneos-xcodesdk]_targetdir := test/ios/bundles/Bundles-iphoneos/$(subst /,_,$1)
$1[iphonesimulator-xcodesdk]_targetdir := test/ios/bundles/Bundles-iphonesimulator/$(subst /,_,$1)
$1[iphoneos-cpp11-xcodesdk]_targetdir := test/ios/bundles/Bundles++11-iphoneos/$(subst /,_,$1)
$1[iphonesimulator-cpp11-xcodesdk]_targetdir := test/ios/bundles/Bundles++11-iphonesimulator/$(subst /,_,$1)

$(create-test-project)
endef
Expand Down
5 changes: 0 additions & 5 deletions cpp/include/Glacier2/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class GLACIER2_API RestartSessionException : public IceUtil::ExceptionHelper<Res
public:

virtual std::string ice_id() const;
#ifndef ICE_CPP11_MAPPING
virtual RestartSessionException* ice_clone() const;
#endif
};

/**
Expand Down Expand Up @@ -65,10 +62,8 @@ class GLACIER2_API Application : public Ice::Application
**/
Application(Ice::SignalPolicy = Ice::ICE_ENUM(SignalPolicy,HandleSignals));

#ifdef ICE_CPP11_MAPPING
Application(const Application&) = delete;
Application& operator=(const Application&) = delete;
#endif

/**
* Creates a new Glacier2 session. A call to
Expand Down
19 changes: 1 addition & 18 deletions cpp/include/Glacier2/SessionHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ const int GLACIER2_TCP_PORT = 4063;
* \headerfile Glacier2/Glacier2.h
*/
class GLACIER2_API SessionHelper
#ifndef ICE_CPP11_MAPPING
: public virtual IceUtil::Shared
#endif
{
public:
virtual ~SessionHelper();
Expand Down Expand Up @@ -90,12 +87,6 @@ class GLACIER2_API SessionHelper
* @throws SessionNotExistException if no session is currently active.
*/
virtual Ice::ObjectAdapterPtr objectAdapter() = 0;

#ifndef ICE_CPP11_MAPPING
bool operator==(const SessionHelper&) const;
bool operator!=(const SessionHelper&) const;
#endif

};
ICE_DEFINE_PTR(SessionHelperPtr, SessionHelper);

Expand All @@ -104,9 +95,6 @@ ICE_DEFINE_PTR(SessionHelperPtr, SessionHelper);
* \headerfile Glacier2/Glacier2.h
*/
class GLACIER2_API SessionCallback
#ifndef ICE_CPP11_MAPPING
: public virtual IceUtil::Shared
#endif
{
public:
virtual ~SessionCallback();
Expand Down Expand Up @@ -146,12 +134,7 @@ class SessionThreadCallback;
* Facilitates the creation of new Glacier2 sessions.
* \headerfile Glacier2/Glacier2.h
*/
class GLACIER2_API SessionFactoryHelper
#ifdef ICE_CPP11_MAPPING
: public std::enable_shared_from_this<SessionFactoryHelper>
#else
: public virtual IceUtil::Shared
#endif
class GLACIER2_API SessionFactoryHelper : public std::enable_shared_from_this<SessionFactoryHelper>
{
/// \cond INTERNAL
friend class SessionThreadCallback; // To access thread functions
Expand Down
15 changes: 0 additions & 15 deletions cpp/include/Ice/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ namespace Ice
using IceUtil::CtrlCHandler;
using IceUtil::CtrlCHandlerCallback;

#ifdef ICE_CPP11_MAPPING
/**
* Determines how the Application class handles signals.
*/
enum class SignalPolicy : unsigned char
#else
enum SignalPolicy
#endif
{
/** Enables signal handling. */
HandleSignals,
Expand All @@ -47,12 +43,10 @@ class ICE_API Application
*/
Application(SignalPolicy policy = ICE_ENUM(SignalPolicy, HandleSignals));

#ifdef ICE_CPP11_MAPPING
/// \cond IGNORE
Application(const Application&) = delete;
Application& operator=(const Application&) = delete;
/// \endcond
#endif

virtual ~Application();

Expand Down Expand Up @@ -310,15 +304,6 @@ class ICE_API Application
static void destroyOnInterruptCallback(int);
static void shutdownOnInterruptCallback(int);
static void callbackOnInterruptCallback(int);

#ifndef ICE_CPP11_MAPPING
//
// Not defined, make Application non-copyable
//
Application(const Application&);
Application& operator=(const Application&);
#endif

};

}
Expand Down
Loading

0 comments on commit 5491f90

Please sign in to comment.