Try 'if (MSVC)' over 'if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")'

Seems cmake tries to interpret "MSVC" as reference to the variable MSVC
in if() statements (see CMP0054)

GIT_SILENT
parent 3f3b5e29
......@@ -76,7 +76,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_target_compile_flag_if_supported(kdevqtc-qmlsupport PRIVATE "-Wno-class-memaccess")
add_target_compile_flag_if_supported(kdevqtc-qmlsupport PRIVATE "-Wno-deprecated-copy")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if (MSVC)
target_compile_options(kdevqtc-qmlsupport PRIVATE "/wd4996") # C4996: warns about deprecated declarations
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment