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

Commit

Permalink
fix problem when contract has 1+ items
Browse files Browse the repository at this point in the history
  • Loading branch information
huangminghuang committed Oct 19, 2021
1 parent 1c240bd commit 3d012e3
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 3d012e3

Please sign in to comment.