File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -120,15 +120,9 @@ function(add_custom_command_target dependency_out_var_name)
120120 set (ACCT_COMMANDS ${ACCT_UNPARSED_ARGUMENTS} )
121121
122122 if ("${ACCT_CUSTOM_TARGET_NAME} " STREQUAL "" )
123- # Construct a unique name for the custom target.
124- # Use a hash so that the file name does not push the OS limits for filename
125- # length.
123+ # CMake doesn't allow '/' characters in filenames, so replace them with '-'
126124 list (GET ACCT_OUTPUT 0 output_filename)
127- string (MD5 target_md5
128- "add_custom_command_target${CMAKE_CURRENT_BINARY_DIR} /${output_filename} " )
129- get_filename_component (output_filename_basename "${output_filename} " NAME )
130- set (target_name
131- "add_custom_command_target-${target_md5} -${output_filename_basename} " )
125+ string (REPLACE "/" "-" target_name "${output_filename} " )
132126 else ()
133127 set (target_name "${ACCT_CUSTOM_TARGET_NAME} " )
134128 endif ()
You can’t perform that action at this time.
0 commit comments