Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.1
-
None
-
-
ae294a42f0 (qt/qtbase/dev) 9794fc4e54 (qt/qtbase/6.3) c679193fde (qt/qtbase/6.2) c679193fde (qt/tqtc-qtbase/6.2)
Description
File: Qt6Targets.cmake
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_DEFINITIONS "WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WIN64;_WIN64;\$<\$<NOT:\$<BOOL:\$<TARGET_PROPERTY:QT_NO_UNICODE_DEFINES>>>:UNICODE;_UNICODE>" INTERFACE_COMPILE_FEATURES "cxx_std_17" INTERFACE_COMPILE_OPTIONS "-Zc:__cplusplus;-permissive-;\$<\$<NOT:\$<BOOL:\$<TARGET_PROPERTY:QT_NO_UTF8_SOURCE>>>:-utf-8>" INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/mkspecs/win32-msvc;${_IMPORT_PREFIX}/include" INTERFACE_LINK_LIBRARIES "Threads::Threads" )
When linking Qt::Core with a library containing CUDA source files, the following flags are incorrectly propagated to nvcc "as-is" thus resulting in nvcc errors such as "unrecognized compile option":
-Zc:__cplusplus -permissive- -utf-8
I wonder if we should instead be doing:
INTERFACE_COMPILE_OPTIONS "\$<\$<COMPILE_LANGUAGE:CXX>:-Zc:__cplusplus;-permissive-;\$<\$<NOT:\$<BOOL:\$<TARGET_PROPERTY:QT_NO_UTF8_SOURCE>>>:-utf-8>>"
UPDATE: The above seems to fix the issue.