Fix hidden friend issue for MSVC

This change is adding the `/Zc:hiddenFriend` option to address strict validation in MSVC 19.32.31328.0
This commit is contained in:
Sid Dahiya 2022-05-18 15:24:41 -07:00 committed by GitHub
parent db4963048d
commit dfe3d39c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ else ()
set_target_properties(test_${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)
endif ()
if (WIN32)
target_compile_options(test_${PROJECT_NAME} PRIVATE /EHc)
target_compile_options(test_${PROJECT_NAME} PRIVATE /EHc /Zc:hiddenFriend)
target_compile_definitions(test_${PROJECT_NAME} PRIVATE _SCL_SECURE_NO_WARNINGS)
elseif (APPLE)
target_compile_options(test_${PROJECT_NAME} PRIVATE -fexceptions -g -Wall)