Skip to content

Commit

Permalink
Adding /Zc:hiddenFriend- compiler flag
Browse files Browse the repository at this point in the history
to workaround Catch2 complation issue with Visual Studio 2019.
  • Loading branch information
wilx committed Jul 6, 2024
1 parent c2588c6 commit 31942b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ if (WITH_UNIT_TESTS)
if (WIN32)
add_compile_definitions (LOG4CPLUS_WITH_UNIT_TESTS=1
NOMINMAX=1)
if (MSVC AND MSVC_TOOLSET_VERSION VERSION_LESS "143")
message (WARNING "Adding /Zc:hiddenFriend- compiler flag to workaround Catch2 complation issue with Visual Studio 2019")
add_compile_options (/Zc:hiddenFriend-)
endif ()
endif (WIN32)
endif (WITH_UNIT_TESTS)

Expand Down

0 comments on commit 31942b9

Please sign in to comment.