diff --git a/CMakeLists.txt b/CMakeLists.txt index 41be6ea..383524f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,6 +167,11 @@ if((${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) OR BDD_INCLUDE_TOOL) endif() endif() +# If this is the master project (or if the user requested it) add isagenerator. +if((${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) OR BDD_INCLUDE_ISAGENERATOR) + add_subdirectory(isagenerator) +endif() + # If this is the master project add install and package targets. if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) set(BDDISASM_INSTALL_CMAKEDIR diff --git a/isagenerator/CMakeLists.txt b/isagenerator/CMakeLists.txt new file mode 100644 index 0000000..f22bf08 --- /dev/null +++ b/isagenerator/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.12) + +project(isagenerator) + +include(FindPython3) + +find_package(Python3 COMPONENTS Interpreter) +if(Python3_FOUND) + add_custom_target( + isagenerator + COMMAND Python3::Interpreter generate_tables.py instructions + WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}" + COMMENT "Generating instruction tables") +endif(Python3_FOUND)