From dfe3d39c105a6a87de05528ce2d94fe23cd3da7d Mon Sep 17 00:00:00 2001 From: Sid Dahiya <53239974+sid-dahiya@users.noreply.github.com> Date: Wed, 18 May 2022 15:24:41 -0700 Subject: [PATCH] Fix hidden friend issue for MSVC This change is adding the `/Zc:hiddenFriend` option to address strict validation in MSVC 19.32.31328.0 --- test/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index cefe4af..0d19a5c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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) @@ -28,4 +28,4 @@ set_tests_properties("test_${PROJECT_NAME}" FAIL_REGULAR_EXPRESSION "Failed \\d+ test cases") set_tests_properties("test_${PROJECT_NAME}" PROPERTIES - TIMEOUT 120) \ No newline at end of file + TIMEOUT 120)