The following issue has been SUBMITTED. ====================================================================== https://cmake.org/Bug/view.php?id=16038 ====================================================================== Reported By: Reid Kleckner Assigned To: ====================================================================== Project: CMake Issue ID: 16038 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2016-03-30 14:51 EDT Last Modified: 2016-03-30 14:51 EDT ====================================================================== Summary: CHECK_COMPILER_FLAG_COMMON_PATTERNS doesn't match clang-cl's unknown argument warning Description: These are the patterns that cmake appears to be looking for to spot unsupported options: FAIL_REGEX "unknown .*option" # Clang FAIL_REGEX "optimization flag .* not supported" # Clang
But we actually have two other diagnostics, one of which needs to be matched: def err_drv_unknown_argument : Error<"unknown argument: '%0'">; def warn_drv_unknown_argument_clang_cl : Warning< "unknown argument ignored in clang-cl: '%0'">, InGroup<UnknownArgument>; The first is an error diagnostic, so you don't need to match it. We added the second because MSVC ignores unknown flags, and clang-cl needs to do the same. We chose the text for consistency with the error diagnostic. Steps to Reproduce: Have this in a cmake project: check_cxx_compiler_flag(-not-a-real-flag IS_REAL_FLAG) Configure the project with clang-cl as the compiler. Observe that IS_REAL_FLAG is ON. Additional Information: This came up while I was trying to build asan with clang-cl. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2016-03-30 14:51 Reid Kleckner New Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers