Apply release prefix maps to nested targets
Modular container CI / release-build (push) Failing after 22m59s
Modular container CI / release-build (push) Failing after 22m59s
This commit is contained in:
1 file changed
+25
-1
+25
-1
@@ -74,11 +74,30 @@ if(ECHOION_REPRODUCIBLE_BUILD)
|
||||
"${ECHOION_COMPONENT_WORKSPACE}=EchoionComponents")
|
||||
endif()
|
||||
foreach(_echoionPrefixMap IN LISTS _echoionPrefixMaps)
|
||||
add_compile_options(
|
||||
list(APPEND _echoionReproducibleCompilerOptions
|
||||
"$<$<COMPILE_LANGUAGE:C,CXX>:-ffile-prefix-map=${_echoionPrefixMap}>"
|
||||
"$<$<COMPILE_LANGUAGE:C,CXX>:-fmacro-prefix-map=${_echoionPrefixMap}>"
|
||||
"$<$<COMPILE_LANGUAGE:C,CXX>:-fdebug-prefix-map=${_echoionPrefixMap}>")
|
||||
endforeach()
|
||||
function(echoion_apply_reproducible_build_options directory)
|
||||
get_property(_echoionDirectoryTargets
|
||||
DIRECTORY "${directory}" PROPERTY BUILDSYSTEM_TARGETS)
|
||||
foreach(_echoionTarget IN LISTS _echoionDirectoryTargets)
|
||||
get_target_property(_echoionTargetType
|
||||
"${_echoionTarget}" TYPE)
|
||||
if(_echoionTargetType MATCHES
|
||||
"^(EXECUTABLE|STATIC_LIBRARY|SHARED_LIBRARY|MODULE_LIBRARY|OBJECT_LIBRARY)$")
|
||||
target_compile_options("${_echoionTarget}" PRIVATE
|
||||
${_echoionReproducibleCompilerOptions})
|
||||
endif()
|
||||
endforeach()
|
||||
get_property(_echoionSubdirectories
|
||||
DIRECTORY "${directory}" PROPERTY SUBDIRECTORIES)
|
||||
foreach(_echoionSubdirectory IN LISTS _echoionSubdirectories)
|
||||
echoion_apply_reproducible_build_options(
|
||||
"${_echoionSubdirectory}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
message(STATUS "Reproducible compiler path mapping enabled")
|
||||
else()
|
||||
message(WARNING
|
||||
@@ -580,6 +599,11 @@ if(ECHOION_ENABLE_LEGACY_CPACK)
|
||||
include(CPack)
|
||||
endif()
|
||||
|
||||
if(ECHOION_REPRODUCIBLE_BUILD AND
|
||||
COMMAND echoion_apply_reproducible_build_options)
|
||||
echoion_apply_reproducible_build_options("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endif()
|
||||
|
||||
# Print configuration summary
|
||||
message(STATUS "")
|
||||
message(STATUS "Echoion Configuration:")
|
||||
|
||||
Reference in new issue
Block a user