Skip to content

reordering preprocessor if chain emmit type info#203

Merged
andresfelipemendez merged 2 commits into
masterfrom
update-sdk
May 8, 2026
Merged

reordering preprocessor if chain emmit type info#203
andresfelipemendez merged 2 commits into
masterfrom
update-sdk

Conversation

@andresfelipemendez
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts build configuration to (1) change how NAKAMA_API export/import macros are selected across platforms/compilers and (2) explicitly enable RTTI compile flags for the nakama-sdk-core-common object library.

Changes:

  • Reordered NAKAMA_API preprocessor selection to prioritize FORCE_DLL_VISIBILITY over the Windows __declspec branch.
  • Added conditional RTTI compile options (-frtti / /GR) to core/common when the RTTI CMake option is enabled.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
interface/include/nakama-cpp/NExport.h Reorders the export macro selection logic, adding a dedicated FORCE_DLL_VISIBILITY branch.
core/common/CMakeLists.txt Adds RTTI compile flags for the nakama-sdk-core-common target when RTTI is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread interface/include/nakama-cpp/NExport.h Outdated
Comment on lines +24 to +30
#if defined FORCE_DLL_VISIBILITY
#ifdef NAKAMA_SHARED_LIBRARY_EXPORTS
#define NAKAMA_API __attribute__((visibility("default")))
#else
#define NAKAMA_API
#endif
#elif defined _WIN32 || defined __CYGWIN__ || defined FORCE_DLL_IMPORT_EXPORT
Comment thread core/common/CMakeLists.txt Outdated
Comment on lines +40 to +44
if (RTTI)
if (NOT MSVC)
target_compile_options(nakama-sdk-core-common PRIVATE "-frtti")
else()
target_compile_options(nakama-sdk-core-common PRIVATE "/GR")
@andresfelipemendez andresfelipemendez merged commit 056bb5a into master May 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants