wip: executable

This commit is contained in:
2025-03-02 22:42:04 +08:00
parent 87b83d754a
commit 6465cf03fe
5 changed files with 110 additions and 20 deletions

View File

@@ -64,22 +64,8 @@ add_library(pycxx STATIC
bytes/python_3_13.cpp
)
add_executable(pycdas pycdas.cpp)
target_link_libraries(pycdas pycxx)
add_executable(pyarmor-1shot pyarmor-1shot.cpp ASTree.cpp ASTNode.cpp)
target_link_libraries(pyarmor-1shot pycxx)
install(TARGETS pycdas
install(TARGETS pyarmor-1shot
RUNTIME DESTINATION bin)
add_executable(pycdc pycdc.cpp ASTree.cpp ASTNode.cpp)
target_link_libraries(pycdc pycxx)
install(TARGETS pycdc
RUNTIME DESTINATION bin)
find_package(Python3 3.6 COMPONENTS Interpreter)
if(Python3_FOUND)
add_custom_target(check
COMMAND "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/tests/run_tests.py"
WORKING_DIRECTORY "$<TARGET_FILE_DIR:pycdc>")
add_dependencies(check pycdc)
endif()