Modify defines for CR and RC to work around name collision on Windows
@@ -254,6 +254,19 @@ function(GenerateNamedObjects sources_in)
# now add the object and set the defines
set(obj_defines ${defines_in})
+ list(FIND obj_defines "RC" def_idx)
+ if (${def_idx} GREATER -1)
+ # list(REMOVE_AT ${obj_defines} ${def_idx})
+ list (REMOVE_ITEM obj_defines "RC")
+ list(APPEND obj_defines "RC=RC")
+ endif ()
+ list(FIND obj_defines "CR" def_idx)
+ if (${def_idx} GREATER -1)
+ # list(REMOVE_AT ${obj_defines} ${def_idx})
+ list (REMOVE_ITEM obj_defines "CR")
+ list(APPEND obj_defines "CR=CR")
+ endif ()
+
if (use_cblas)
set(obj_name "cblas_${obj_name}")
list(APPEND obj_defines "CBLAS")
