Sync from Piper @391414001

PROTOBUF_SYNC_PIPER
diff --git a/cmake/tests.cmake b/cmake/tests.cmake
index 225db93..b2cedf6 100644
--- a/cmake/tests.cmake
+++ b/cmake/tests.cmake
@@ -132,6 +132,7 @@
   ${protobuf_source_dir}/src/google/protobuf/arena_unittest.cc
   ${protobuf_source_dir}/src/google/protobuf/arenastring_unittest.cc
   ${protobuf_source_dir}/src/google/protobuf/compiler/annotation_test_util.cc
+  ${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc
   ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
   ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_move_unittest.cc
   ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc
@@ -203,21 +204,12 @@
   ${protobuf_source_dir}/src/google/protobuf/wire_format_unittest.inc
 )
 
-set(non_msvc_tests_files
-  ${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc
-)
-
-set(all_tests_files
-  ${tests_files}
-  ${non_msvc_tests_files}
-)
-
 if(protobuf_ABSOLUTE_TEST_PLUGIN_PATH)
   add_compile_options(-DGOOGLE_PROTOBUF_TEST_PLUGIN_PATH="$<TARGET_FILE:test_plugin>")
 endif()
 
 if(MINGW)
-  set_source_files_properties(${all_tests_files} PROPERTIES COMPILE_FLAGS "-Wno-narrowing")
+  set_source_files_properties(${tests_files} PROPERTIES COMPILE_FLAGS "-Wno-narrowing")
 
   # required for tests on MinGW Win64
   if (CMAKE_SIZEOF_VOID_P EQUAL 8)
@@ -227,14 +219,14 @@
 
 endif()
 
-add_executable(tests ${all_tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files})
+add_executable(tests ${tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files})
 target_link_libraries(tests libprotoc libprotobuf gmock_main)
 
 set(test_plugin_files
   ${protobuf_source_dir}/src/google/protobuf/compiler/mock_code_generator.cc
+  ${protobuf_source_dir}/src/google/protobuf/compiler/test_plugin.cc
   ${protobuf_source_dir}/src/google/protobuf/testing/file.cc
   ${protobuf_source_dir}/src/google/protobuf/testing/file.h
-  ${protobuf_source_dir}/src/google/protobuf/compiler/test_plugin.cc
 )
 
 add_executable(test_plugin ${test_plugin_files})