Skip to content

Commit

Permalink
Port IceGrid, IceStorm, and IceXML to C++17 (#1629)
Browse files Browse the repository at this point in the history
Co-authored-by: Joe George <[email protected]>
Co-authored-by: Bernard Normier <[email protected]>
Co-authored-by: Austin Henriksen <[email protected]>
Co-authored-by: Benoit Foucher <[email protected]>
  • Loading branch information
5 people authored Jan 4, 2024
1 parent 1ce4bc2 commit 6e5ce3f
Show file tree
Hide file tree
Showing 256 changed files with 12,110 additions and 14,127 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ jobs:
uses: actions/checkout@v3
- name: Build
run: make -j8 V=1 CONFIGS="shared cpp98-shared cpp11-shared"
- name: Test
run: ./allTests.py --workers=4
- name: Tests
run: ./allTests.py --workers=4 --config=cpp11-shared
- name: C++98 Tests
run: ./allTests.py --workers=4 --config=cpp98-shared --languages=cpp
31 changes: 24 additions & 7 deletions cpp/config/Make.rules
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,42 @@ static_excludes = test/Ice/library test/Ice/plugin
# Components and projects which are built with C++98
#
cpp98_projects = %
cpp98_excludes = glacier2router
cpp98_excludes = glacier2router \
icebridge \
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
cpp11_components = $(coreandstub_components) \
glacier2router Glacier2CryptPermissionsVerifier \
icebox icebridge \
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/Glacier2/application \
test/Glacier2/sessionHelper \
test/IceGrid/simple
test/IceGrid/% \
test/IceStorm/% \
test/Glacier2/% \
test/IceGrid/% \
test/IceBridge/simple

cpp11_excludes = IcePatch2 \
test/Ice/gc
cpp11_excludes = test/Ice/gc

#
# If building on a Linux multilib platform, we restrict what we build for
Expand Down
1 change: 0 additions & 1 deletion cpp/doxygen/config-cpp11
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,6 @@ EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS = IceInternal \
IceUtilInternal \
Glacier2Internal \
IcePatch2 \
std

# The EXAMPLE_PATH tag can be used to specify one or more files or directories
Expand Down
29 changes: 24 additions & 5 deletions cpp/include/IcePatch2/ClientUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ namespace IcePatch2
// allow the user to interact with the patching and report progress
// on the patching.
//
class ICEPATCH2_API PatcherFeedback : public IceUtil::Shared
class ICEPATCH2_API PatcherFeedback
#ifndef ICE_CPP11_MAPPING
: public IceUtil::Shared
#endif // !ICE_CPP11_MAPPING
{
public:

Expand Down Expand Up @@ -65,13 +68,19 @@ class ICEPATCH2_API PatcherFeedback : public IceUtil::Shared
virtual bool patchProgress(Ice::Long, Ice::Long, Ice::Long, Ice::Long) = 0;
virtual bool patchEnd() = 0;
};
#ifdef ICE_CPP11_MAPPING
typedef std::shared_ptr<PatcherFeedback> PatcherFeedbackPtr;
#else
typedef IceUtil::Handle<PatcherFeedback> PatcherFeedbackPtr;

#endif
//
// IcePatch2 clients instantiate the IcePatch2::Patcher class to patch
// a given local data directory.
//
class ICEPATCH2_API Patcher : public IceUtil::Shared
class ICEPATCH2_API Patcher
#ifndef ICE_CPP11_MAPPING
: public IceUtil::Shared
#endif
{
public:

Expand Down Expand Up @@ -106,13 +115,23 @@ class ICEPATCH2_API Patcher : public IceUtil::Shared
//
virtual void finish() = 0;
};

#ifdef ICE_CPP11_MAPPING
typedef std::shared_ptr<Patcher> PatcherPtr;
#else
typedef IceUtil::Handle<Patcher> PatcherPtr;
#endif // ICE_CPP11_MAPPING



//
// IcePatch2 clients instantiate the IcePatch2::Patcher class
// using the patcher factory.
//
class ICEPATCH2_API PatcherFactory : public IceUtil::noncopyable
class ICEPATCH2_API PatcherFactory
#ifndef ICE_CPP11_MAPPING
: public IceUtil::noncopyable
#endif // !ICE_CPP11_MAPPING
{
public:

Expand All @@ -135,7 +154,7 @@ class ICEPATCH2_API PatcherFactory : public IceUtil::noncopyable
// Create a patcher with the given parameters. These parameters
// are equivalent to the configuration properties described above.
//
static PatcherPtr create(const FileServerPrx&, const PatcherFeedbackPtr&, const std::string&, bool, Ice::Int, Ice::Int);
static PatcherPtr create(const FileServerPrxPtr&, const PatcherFeedbackPtr&, const std::string&, bool, Ice::Int, Ice::Int);
};

}
Expand Down
1 change: 1 addition & 0 deletions cpp/msbuild/ice.cpp.props
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<!-- PDB settings -->
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName)-objs.pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<AdditionalDependencies />
Expand Down
Loading

0 comments on commit 6e5ce3f

Please sign in to comment.