fix build setup
This commit is contained in:
parent
a1fa8877f7
commit
f2bf6d682a
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
|
||||||
project(tgc VERSION 1.0.0)
|
project(dbt-core-tgc VERSION 1.0.0)
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
@ -27,19 +27,17 @@ endif()
|
||||||
add_subdirectory(softfloat)
|
add_subdirectory(softfloat)
|
||||||
|
|
||||||
# library files
|
# library files
|
||||||
FILE(GLOB RiscVSCHeaders ${CMAKE_CURRENT_SOURCE_DIR}/incl/sysc/*.h ${CMAKE_CURRENT_SOURCE_DIR}/incl/sysc/*/*.h)
|
FILE(GLOB TGC_SOURCES
|
||||||
set(LIB_HEADERS tgfscVSCHeaders} )
|
${CMAKE_CURRENT_SOURCE_DIR}/src/iss/*.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/vm/interp/vm_*.cpp
|
||||||
|
)
|
||||||
set(LIB_SOURCES
|
set(LIB_SOURCES
|
||||||
src/vm/fp_functions.cpp
|
src/vm/fp_functions.cpp
|
||||||
src/plugin/instruction_count.cpp
|
src/plugin/instruction_count.cpp
|
||||||
src/plugin/cycle_estimate.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)
|
if(WITH_LLVM)
|
||||||
set(LIB_SOURCES ${LIB_SOURCES}
|
set(LIB_SOURCES ${LIB_SOURCES}
|
||||||
src/vm/llvm/fp_impl.cpp
|
src/vm/llvm/fp_impl.cpp
|
||||||
|
@ -86,7 +84,7 @@ if(SystemC_FOUND)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project("tgc-sim")
|
project(tgc-sim)
|
||||||
add_executable(${PROJECT_NAME} src/main.cpp)
|
add_executable(${PROJECT_NAME} src/main.cpp)
|
||||||
# This sets the include directory for the reference project. This is the -I flag in gcc.
|
# 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})
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${llvm_libs})
|
||||||
endif()
|
endif()
|
||||||
# Links the target exe against the libraries
|
# 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} jsoncpp)
|
||||||
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} )
|
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} )
|
||||||
if (Tcmalloc_FOUND)
|
if (Tcmalloc_FOUND)
|
||||||
target_link_libraries(${PROJECT_NAME} ${Tcmalloc_LIBRARIES})
|
target_link_libraries(${PROJECT_NAME} ${Tcmalloc_LIBRARIES})
|
||||||
endif(Tcmalloc_FOUND)
|
endif(Tcmalloc_FOUND)
|
||||||
|
|
||||||
install(TARGETS tgc tgc-sim
|
install(TARGETS dbt-core-tgc tgc-sim
|
||||||
EXPORT ${PROJECT_NAME}Targets # for downstream dependencies
|
EXPORT ${PROJECT_NAME}Targets # for downstream dependencies
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # static lib
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # static lib
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries
|
||||||
|
|
Loading…
Reference in New Issue