Skip to content

Commit

Permalink
add antler-proj to cdt
Browse files Browse the repository at this point in the history
  • Loading branch information
dimas1185 committed Mar 15, 2023
1 parent 7c2c7e8 commit 9736614
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "tools/external/eos-vm"]
path = tools/external/eos-vm
url = https://github.com/AntelopeIO/eos-vm
[submodule "tools/external/antler-proj"]
path = tools/external/antler-proj
url = https://github.com/AntelopeIO/antler-proj
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ configure_file(${CMAKE_SOURCE_DIR}/cdt-llvm/LICENSE.TXT ${CMAKE_BINARY_DIR}/lice
configure_file(${CMAKE_SOURCE_DIR}/libraries/boost/boost.license ${CMAKE_BINARY_DIR}/licenses/boost.license COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/meta_refl/LICENSE ${CMAKE_BINARY_DIR}/licenses/meta_refl.license COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/tools/external/wabt/LICENSE ${CMAKE_BINARY_DIR}/licenses/wabt.license COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/tools/external/antler-proj/LICENSE ${CMAKE_BINARY_DIR}/licenses/antler-proj.license COPYONLY)
file(GLOB license_files ${CMAKE_SOURCE_DIR}/tools/external/antler-proj/licenses/*)
# add licenses for antler-proj submodules
foreach(full_path IN ITEMS ${license_files})
# change format to match other license filenames
get_filename_component(file_name ${full_path} NAME)
string(REPLACE "LICENSE." "" file_name ${file_name})
string(TOLOWER ${file_name} file_name)
set(file_name "${file_name}.license")
configure_file("${full_path}" "${CMAKE_BINARY_DIR}/licenses/${file_name}" COPYONLY)
endforeach()
configure_file(${CMAKE_SOURCE_DIR}/tools/jsoncons/LICENSE ${CMAKE_BINARY_DIR}/licenses/jsoncons.license COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/LICENSE ${CMAKE_BINARY_DIR}/licenses/cdt.license COPYONLY)

Expand Down
1 change: 1 addition & 0 deletions modules/InstallCDT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ cdt_tool_install_and_symlink(cdt-cpp cdt-cpp)
cdt_tool_install_and_symlink(cdt-ld cdt-ld)
cdt_tool_install_and_symlink(cdt-abidiff cdt-abidiff)
cdt_tool_install_and_symlink(cdt-init cdt-init)
cdt_tool_install_and_symlink(antler-proj antler-proj)

cdt_clang_install(../lib/LLVMEosioApply${CMAKE_SHARED_LIBRARY_SUFFIX})
cdt_clang_install(../lib/LLVMEosioSoftfloat${CMAKE_SHARED_LIBRARY_SUFFIX})
Expand Down
13 changes: 12 additions & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ include_directories(${LLVM_SRCDIR}/include)
include_directories(${LLVM_BINDIR}/include)
link_directories(${LLVM_LIBRARY_DIRS})
add_definitions(${LLVM_DEFINITIONS})
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)


set(CMAKE_CXX_STANDARD 17)
set(EOSIO_STACK_SIZE 8192)
Expand Down Expand Up @@ -70,7 +72,6 @@ macro (add_tool name)
LLVMDemangle
)

add_custom_command( TARGET ${name} POST_BUILD COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin )
add_custom_command( TARGET ${name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${name}> ${CMAKE_BINARY_DIR}/bin/ )
endmacro()

Expand All @@ -84,3 +85,13 @@ add_subdirectory(external)
add_subdirectory(antler-run)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/compiler_options.hpp.in ${CMAKE_BINARY_DIR}/compiler_options.hpp)

add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/bin/antler-proj
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:antler-proj> ${CMAKE_BINARY_DIR}/bin/
DEPENDS antler-proj
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/external/antler-proj/tools
)

add_custom_target(copy_files ALL
DEPENDS ${CMAKE_BINARY_DIR}/bin/antler-proj
)
3 changes: 2 additions & 1 deletion tools/external/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
add_subdirectory(wabt)
add_subdirectory(eos-vm)
add_subdirectory(eos-vm)
add_subdirectory(antler-proj)
1 change: 1 addition & 0 deletions tools/external/antler-proj
Submodule antler-proj added at 86ad4f

0 comments on commit 9736614

Please sign in to comment.