Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ask msvc to report the correct C++ version in __cplusplus macro #7545

Merged
merged 1 commit into from
Jun 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,12 @@ rule building ( properties * )
# https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170
result += <cxxflags>/permissive- ;
}

# ask the compiler to correctly set __cplusplus version
if <toolset>msvc in $(properties)
{
result += <msvc-version-macro>on ;
}
}


Expand Down Expand Up @@ -686,6 +692,10 @@ feature export-extra : off on : composite propagated ;
# symbol table reasonably small
feature.compose <export-extra>on : <define>TORRENT_EXPORT_EXTRA ;

feature msvc-version-macro : off on : composite propagated link-incompatible ;
# ask the compiler to correctly set __cplusplus version
feature.compose <msvc-version-macro>on : <cxxflags>/Zc\:__cplusplus ;

lib advapi32 : : <name>advapi32 ;
lib user32 : : <name>user32 ;
lib shell32 : : <name>shell32 ;
Expand Down
Loading