Use compiler ID check for /guard:cf and /GL flags on MSVC by KseniyaTikhomirova · Pull Request #374 · oneapi-src/level-zero

Conversation

@KseniyaTikhomirova

check_cxx_compiler_flag is not fully sufficient here. "A successful result only indicates that the compiler did not report an error when given the flag. Whether the flag has any effect, or the intended one, is outside the scope of this module."
clang-cl reports these flags as supported but they are not used during compilation stage and command line without linking ( "-c" ) reports warning that the flag is unused. This warning is converted to error with werror enabled.
This commit reverts previous changes and moves troublesome flags under the explicit check of compiler name.

Signed-off-by: Tikhomirova, Kseniya <kseniya.tikhomirova@intel.com>
Signed-off-by: Tikhomirova, Kseniya <kseniya.tikhomirova@intel.com>

nrspruit

2 participants

@KseniyaTikhomirova @nrspruit