File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -844,13 +844,17 @@ function(_compile_swift_files
844844 endif ()
845845 endif ()
846846
847- # First generate the obj dirs
847+ # First generate the obj dirs if not created before
848848 list (REMOVE_DUPLICATES dirs_to_create)
849- add_custom_command_target(
850- create_dirs_dependency_target
851- COMMAND "${CMAKE_COMMAND} " -E make_directory ${dirs_to_create}
852- OUTPUT ${dirs_to_create}
853- COMMENT "Generating dirs for ${first_output} " )
849+ list (REMOVE_ITEM dirs_to_create ${CREATED_OBJ_DIRS} )
850+ if (NOT dirs_to_create STREQUAL "" )
851+ add_custom_command_target(
852+ create_dirs_dependency_target
853+ COMMAND "${CMAKE_COMMAND} " -E make_directory ${dirs_to_create}
854+ OUTPUT ${dirs_to_create}
855+ COMMENT "Generating dirs for ${first_output} " )
856+ set (CREATED_OBJ_DIRS ${CREATED_OBJ_DIRS} ${dirs_to_create} CACHE INTERNAL "Already created obj directories" )
857+ endif ()
854858
855859 # Then we can compile both the object files and the swiftmodule files
856860 # in parallel in this target for the object file, and ...
You can’t perform that action at this time.
0 commit comments