From a5186ff88d268067b59c3f3afbd9fcca8e18d31e Mon Sep 17 00:00:00 2001 From: Stas Date: Fri, 12 Mar 2021 11:16:24 +0100 Subject: [PATCH] optional dependency to TGF_B_src target --- CMakeLists.txt | 8 ++++++-- src/sysc/core_complex.cpp | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 436609c..5b460da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,8 +51,12 @@ endif() # Define the library add_library(tgfs SHARED ${LIB_SOURCES}) # list code gen dependencies -add_dependencies(tgfs TGF_B_src) -add_dependencies(tgfs TGF_C_src) +if(TARGET TGF_B_src) + add_dependencies(tgfs TGF_B_src) +endif() +if(TARGET TGF_C_src) + add_dependencies(tgfs TGF_C_src) +endif() target_compile_options(tgfs PRIVATE -Wno-shift-count-overflow) target_include_directories(tgfs PUBLIC incl) diff --git a/src/sysc/core_complex.cpp b/src/sysc/core_complex.cpp index 297fdbf..4e06961 100644 --- a/src/sysc/core_complex.cpp +++ b/src/sysc/core_complex.cpp @@ -277,8 +277,10 @@ vm_ptr create_cpu(core_wrapper* cpu, std::string const& backend, unsigned gdb_po if(backend == "llvm") return vm_ptr{iss::llvm::create(lcpu, gdb_port)}; #endif +#ifdef WITH_TCC if(backend == "tcc") return vm_ptr{iss::tcc::create(cpu, gdb_port)}; +#endif return {nullptr}; }