From f2bf6d682a1b3eeabe416339b77275ed5c9e8e53 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 13 May 2021 14:03:10 +0200 Subject: [PATCH] fix build setup --- CMakeLists.txt | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04b138b..84028de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.12) -project(tgc VERSION 1.0.0) +project(dbt-core-tgc VERSION 1.0.0) include(GNUInstallDirs) @@ -27,25 +27,23 @@ endif() add_subdirectory(softfloat) # library files -FILE(GLOB RiscVSCHeaders ${CMAKE_CURRENT_SOURCE_DIR}/incl/sysc/*.h ${CMAKE_CURRENT_SOURCE_DIR}/incl/sysc/*/*.h) -set(LIB_HEADERS tgfscVSCHeaders} ) +FILE(GLOB TGC_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/src/iss/*.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/vm/interp/vm_*.cpp +) set(LIB_SOURCES src/vm/fp_functions.cpp src/plugin/instruction_count.cpp src/plugin/cycle_estimate.cpp + ${TGC_SOURCES} ) -if(EXISTS src/iss/tgf_b.cpp) - set(LIB_SOURCES ${LIB_SOURCES} src/iss/tgf_b.cpp src/vm/interp/vm_tgf_b.cpp) -endif() -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/iss/tgf_c.cpp) - set(LIB_SOURCES ${LIB_SOURCES} src/iss/tgf_c.cpp src/vm/interp/vm_tgf_c.cpp) -endif() + if(WITH_LLVM) -set(LIB_SOURCES ${LIB_SOURCES} + set(LIB_SOURCES ${LIB_SOURCES} src/vm/llvm/fp_impl.cpp -# src/vm/llvm/vm_tgf_b.cpp -# src/vm/llvm/vm_tgf_c.cpp -) + #src/vm/llvm/vm_tgf_b.cpp + #src/vm/llvm/vm_tgf_c.cpp + ) endif() # Define the library @@ -86,7 +84,7 @@ if(SystemC_FOUND) ) endif() -project("tgc-sim") +project(tgc-sim) add_executable(${PROJECT_NAME} src/main.cpp) # This sets the include directory for the reference project. This is the -I flag in gcc. @@ -95,14 +93,14 @@ if(WITH_LLVM) target_link_libraries(${PROJECT_NAME} PUBLIC ${llvm_libs}) endif() # Links the target exe against the libraries -target_link_libraries(${PROJECT_NAME} tgc) +target_link_libraries(${PROJECT_NAME} dbt-core-tgc) target_link_libraries(${PROJECT_NAME} jsoncpp) target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} ) if (Tcmalloc_FOUND) target_link_libraries(${PROJECT_NAME} ${Tcmalloc_LIBRARIES}) endif(Tcmalloc_FOUND) -install(TARGETS tgc tgc-sim +install(TARGETS dbt-core-tgc tgc-sim EXPORT ${PROJECT_NAME}Targets # for downstream dependencies ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # static lib RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries