File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,16 +116,24 @@ function(add_ur_target_compile_options name)
116116 $<$<CXX_COMPILER_ID :GNU >:-fdiagnostics -color =always >
117117 $<$<CXX_COMPILER_ID :Clang ,AppleClang >:-fcolor -diagnostics >
118118 )
119+ if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM" )
120+ # icx emits calls to _intel_fast_memcpy/_intel_fast_memset; link
121+ # libirc directly so those symbols resolve.
122+ target_link_libraries (${name} PRIVATE irc )
123+ endif ()
119124 if (UR_DEVELOPER_MODE)
120125 target_compile_options (${name} PRIVATE -Werror -Wextra )
121126 endif ()
122127 if (CMAKE_BUILD_TYPE STREQUAL "Release" )
123128 target_compile_options (${name} PRIVATE -fvisibility=hidden )
124129 endif ()
125130 elseif (MSVC )
131+ # Select the dynamic CRT (/MD, /MDd) via the canonical property rather
132+ # than a hardcoded flag, so it can be overridden per target.
133+ set_target_properties (${name} PROPERTIES
134+ MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG :Debug >:Debug >DLL" )
126135 target_compile_options (${name} PRIVATE
127136 $<$<CXX_COMPILER_ID :MSVC >:/MP > # clang-cl.exe does not support /MP
128- /MD$<$<CONFIG:Debug>:d>
129137
130138 /W3
131139 /GS # Enable: Buffer security check
You can’t perform that action at this time.
0 commit comments