Skip to content

Commit 1f7577b

Browse files
authored
Add option ENABLE_SOURCE_MODIFICATION (#2739)
### Issues: Addresses: aws/aws-lc-rs#909 ### Description of changes: Introduce option to enabled modification of a source directory. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
1 parent 4c02092 commit 1f7577b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ option(ENABLE_FIPS_ENTROPY_CPU_JITTER "Enable FIPS entropy source: CPU Jitter" O
9494
option(ENABLE_DATA_INDEPENDENT_TIMING "Enable automatic setting/resetting Data-Independent Timing
9595
(DIT) flag in cryptographic functions. Currently only applicable to Arm64 (except on Windows)" OFF)
9696
option(ENABLE_PRE_SONAME_BUILD "Build AWS-LC without SONAME configuration for shared library builds" ON)
97+
option(ENABLE_SOURCE_MODIFICATION "Allow the build to update files in the source directory. This is typically done to update versioning." ON)
9798
include(cmake/go.cmake)
9899

99100
if(NOT ENABLE_PRE_SONAME_BUILD AND BUILD_SHARED_LIBS AND UNIX AND NOT APPLE)
@@ -1353,8 +1354,10 @@ foreach(in_file ${OPENSSL_PKGCONFIGS})
13531354
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pc_file} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
13541355
endforeach()
13551356

1356-
configure_file(include/openssl/base.h.in ${AWSLC_SOURCE_DIR}/include/openssl/base.h @ONLY)
1357-
configure_file(include/openssl/opensslv.h.in ${AWSLC_SOURCE_DIR}/include/openssl/opensslv.h @ONLY)
1358-
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/util/check-linkage.sh.in")
1359-
configure_file(util/check-linkage.sh.in check-linkage.sh @ONLY)
1357+
if(ENABLE_SOURCE_MODIFICATION)
1358+
configure_file(include/openssl/base.h.in ${AWSLC_SOURCE_DIR}/include/openssl/base.h @ONLY)
1359+
configure_file(include/openssl/opensslv.h.in ${AWSLC_SOURCE_DIR}/include/openssl/opensslv.h @ONLY)
1360+
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/util/check-linkage.sh.in")
1361+
configure_file(util/check-linkage.sh.in check-linkage.sh @ONLY)
1362+
endif()
13601363
endif()

0 commit comments

Comments
 (0)