Skip to content

Commit

Permalink
Create dirs in cmake build dir with default permissions (aws#1269)
Browse files Browse the repository at this point in the history
The downstream project, aws-iot-device-sdk-cpp-v2, fails to perform cmake configuration when sources are read-only. One of the issues is that aws-lc fails to perform cmake configuration for read-only sources.

By default, the file(COPY) cmake command preserves input file permissions. When source directory is read-only, this causes destination directory to be also read-only, which causes cmake configuration to fail when it tries to create a new file in the destination directory.
NO_SOURCE_PERMISSIONS option resolves the issue.

Co-authored-by: Igor Abdrakhimov <[email protected]>
  • Loading branch information
sfod and sfodagain authored Nov 1, 2023
1 parent 4da3dab commit 0ba0a1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ else()
if(DEFINED ASSEMBLY_SOURCE)
if(EXISTS ${ASSEMBLY_SOURCE})
message("Copying platform assembly files from ${ASSEMBLY_SOURCE} to ${CMAKE_CURRENT_BINARY_DIR}")
file(COPY ${ASSEMBLY_SOURCE}/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${ASSEMBLY_SOURCE}/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} NO_SOURCE_PERMISSIONS)
else()
message(STATUS "${ASSEMBLY_SOURCE} assembly files do not exist.")
endif()
Expand Down

0 comments on commit 0ba0a1e

Please sign in to comment.