Skip to content

Commit c3036c8

Browse files
author
Chris B
authored
Merge pull request #5190 from llvm-beanz/fix-xcode-generator-after-pr5182
[CMake] Fix the Xcode generator
2 parents 42a0c46 + 40e14e3 commit c3036c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/modules/SwiftAddCustomCommandTarget.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ function(add_custom_command_target dependency_out_var_name)
122122
if("${ACCT_CUSTOM_TARGET_NAME}" STREQUAL "")
123123
# CMake doesn't allow '/' characters in filenames, so replace them with '-'
124124
list(GET ACCT_OUTPUT 0 output_filename)
125-
string(REPLACE "/" "-" target_name "${output_filename}")
125+
string(REPLACE "${CMAKE_BINARY_DIR}/" "" target_name "${output_filename}")
126+
string(REPLACE "${CMAKE_CFG_INTDIR}/" "" target_name "${target_name}")
127+
string(REPLACE "/" "-" target_name "${target_name}")
126128
else()
127129
set(target_name "${ACCT_CUSTOM_TARGET_NAME}")
128130
endif()

0 commit comments

Comments
 (0)