Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1220 from EOSIO/huangminghuang/EPE-1236-cmake-fix
Browse files Browse the repository at this point in the history
fix problem when contract has 1+ items
  • Loading branch information
bogniq authored Oct 19, 2021
2 parents 1c240bd + 3d012e3 commit 4454c09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/EosioCDTMacros.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ if (NOT EOSIO_WASM_OLD_BEHAVIOR STREQUAL "On")
target_compile_options( ${TARGET} PUBLIC -contract ${CONTRACT_NAME} )
file(GLOB contracts ${CMAKE_CURRENT_SOURCE_DIR}/${CONTRACT_NAME}.contracts.md ${CMAKE_CURRENT_SOURCE_DIR}/${CONTRACT_NAME}.clauses.md)
if(contracts)
set_source_files_properties(${ARGN} PROPERTIES OBJECT_DEPENDS ${contracts})
set_source_files_properties(${ARGN} PROPERTIES OBJECT_DEPENDS "${contracts}")
endif()
endmacro()
macro (target_ricardian_directory TARGET DIR)
target_compile_options( ${TARGET} PUBLIC -R${DIR} )
file(GLOB contracts ${DIR}/*.contracts.md ${DIR}/*.clauses.md)
get_target_property(contract_sources ${TARGET} SOURCES)
if(contracts)
set_source_files_properties(${contract_sources} PROPERTIES OBJECT_DEPENDS ${contracts})
set_source_files_properties(${contract_sources} PROPERTIES OBJECT_DEPENDS "${contracts}")
endif()
endmacro()

Expand All @@ -28,15 +28,15 @@ else()
target_compile_options( ${TARGET}.wasm PUBLIC -contract ${CONTRACT_NAME} )
file(GLOB contracts ${CMAKE_CURRENT_SOURCE_DIR}/${CONTRACT_NAME}.contracts.md ${CMAKE_CURRENT_SOURCE_DIR}/${CONTRACT_NAME}.clauses.md)
if(contracts)
set_source_files_properties(${ARGN} PROPERTIES OBJECT_DEPENDS ${contracts})
set_source_files_properties(${ARGN} PROPERTIES OBJECT_DEPENDS "${contracts}")
endif()
endmacro()
macro (target_ricardian_directory TARGET DIR)
target_compile_options( ${TARGET}.wasm PUBLIC -R${DIR} )
file(GLOB contracts ${DIR}/*.contracts.md ${DIR}/*.clauses.md)
get_target_property(contract_sources ${TARGET}.wasm SOURCES)
if(contracts)
set_source_files_properties(${contract_sources} PROPERTIES OBJECT_DEPENDS ${contracts})
set_source_files_properties(${contract_sources} PROPERTIES OBJECT_DEPENDS "${contracts}")
endif()
endmacro()
endif()
Expand Down

0 comments on commit 4454c09

Please sign in to comment.