mirror of
https://github.com/facebook/zstd.git
synced 2025-10-08 00:04:02 -04:00
Merge pull request #3569 from tru/linker_flag_fix
Disable linker flag detection on MSVC/ClangCL.
This commit is contained in:
commit
871f3a4026
@ -33,7 +33,12 @@ function(EnableCompilerFlag _flag _C _CXX _LD)
|
|||||||
# implement CHECK_LINKER_FLAG() like feature for CMake < 3.18
|
# implement CHECK_LINKER_FLAG() like feature for CMake < 3.18
|
||||||
# or require CMake >= 3.18 when we need to add a required
|
# or require CMake >= 3.18 when we need to add a required
|
||||||
# linker flag in future.
|
# linker flag in future.
|
||||||
if (ZSTD_HAVE_CHECK_LINKER_FLAG)
|
#
|
||||||
|
# We also skip linker flags check for MSVC compilers (which includes
|
||||||
|
# clang-cl) since currently check_linker_flag() doesn't give correct
|
||||||
|
# results for this configuration,
|
||||||
|
# see: https://gitlab.kitware.com/cmake/cmake/-/issues/22023
|
||||||
|
if (ZSTD_HAVE_CHECK_LINKER_FLAG AND NOT MSVC)
|
||||||
CHECK_LINKER_FLAG(C ${_flag} LD_FLAG_${varname})
|
CHECK_LINKER_FLAG(C ${_flag} LD_FLAG_${varname})
|
||||||
else ()
|
else ()
|
||||||
set(LD_FLAG_${varname} false)
|
set(LD_FLAG_${varname} false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user