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
844
844
endif ()
845
845
endif ()
846
846
847
- # First generate the obj dirs
847
+ # First generate the obj dirs if not created before
848
848
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 ()
854
858
855
859
# Then we can compile both the object files and the swiftmodule files
856
860
# in parallel in this target for the object file, and ...
You can’t perform that action at this time.
0 commit comments