update name
This commit is contained in:
parent
b0bcb7febb
commit
412a4bd9bb
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
|
||||||
project(tgfs VERSION 1.0.0)
|
project(tgc VERSION 1.0.0)
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ set(LIB_SOURCES ${LIB_SOURCES}
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Define the library
|
# Define the library
|
||||||
add_library(tgfs SHARED ${LIB_SOURCES})
|
add_library(${PROJECT_NAME} SHARED ${LIB_SOURCES})
|
||||||
# list code gen dependencies
|
# list code gen dependencies
|
||||||
if(TARGET TGF_B_src)
|
if(TARGET TGF_B_src)
|
||||||
add_dependencies(tgfs TGF_B_src)
|
add_dependencies(tgfs TGF_B_src)
|
||||||
|
@ -58,54 +58,54 @@ if(TARGET TGF_C_src)
|
||||||
add_dependencies(tgfs TGF_C_src)
|
add_dependencies(tgfs TGF_C_src)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_options(tgfs PRIVATE -Wno-shift-count-overflow)
|
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-shift-count-overflow)
|
||||||
target_include_directories(tgfs PUBLIC incl)
|
target_include_directories(${PROJECT_NAME} PUBLIC incl)
|
||||||
target_link_libraries(tgfs PUBLIC softfloat scc-util)
|
target_link_libraries(${PROJECT_NAME} PUBLIC softfloat scc-util)
|
||||||
target_link_libraries(tgfs PUBLIC -Wl,--whole-archive dbt-core -Wl,--no-whole-archive)
|
target_link_libraries(${PROJECT_NAME} PUBLIC -Wl,--whole-archive dbt-core -Wl,--no-whole-archive)
|
||||||
target_link_libraries(tgfs PUBLIC ${Boost_LIBRARIES} )
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${Boost_LIBRARIES} )
|
||||||
set_target_properties(tgfs PROPERTIES
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
VERSION ${PROJECT_VERSION}
|
VERSION ${PROJECT_VERSION}
|
||||||
FRAMEWORK FALSE
|
FRAMEWORK FALSE
|
||||||
PUBLIC_HEADER "${LIB_HEADERS}" # specify the public headers
|
PUBLIC_HEADER "${LIB_HEADERS}" # specify the public headers
|
||||||
)
|
)
|
||||||
|
|
||||||
if(SystemC_FOUND)
|
if(SystemC_FOUND)
|
||||||
add_library(tgfs_sc src/sysc/core_complex.cpp)
|
add_library(${PROJECT_NAME}_sc src/sysc/core_complex.cpp)
|
||||||
target_compile_definitions(tgfs_sc PUBLIC WITH_SYSTEMC)
|
target_compile_definitions(${PROJECT_NAME}_sc PUBLIC WITH_SYSTEMC)
|
||||||
target_include_directories(tgfs_sc PUBLIC ../incl ${SystemC_INCLUDE_DIRS} ${CCI_INCLUDE_DIRS})
|
target_include_directories(${PROJECT_NAME}_sc PUBLIC ../incl ${SystemC_INCLUDE_DIRS} ${CCI_INCLUDE_DIRS})
|
||||||
|
|
||||||
if(SCV_FOUND)
|
if(SCV_FOUND)
|
||||||
target_compile_definitions(tgfs_sc PUBLIC WITH_SCV)
|
target_compile_definitions(${PROJECT_NAME}_sc PUBLIC WITH_SCV)
|
||||||
target_include_directories(tgfs_sc PUBLIC ${SCV_INCLUDE_DIRS})
|
target_include_directories(${PROJECT_NAME}_sc PUBLIC ${SCV_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(tgfs_sc PUBLIC tgfs scc )
|
target_link_libraries(${PROJECT_NAME}_sc PUBLIC ${PROJECT_NAME} scc )
|
||||||
if(WITH_LLVM)
|
if(WITH_LLVM)
|
||||||
target_link_libraries(tgfs_sc PUBLIC ${llvm_libs})
|
target_link_libraries(${PROJECT_NAME}_sc PUBLIC ${llvm_libs})
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(tgfs_sc PROPERTIES
|
set_target_properties(${PROJECT_NAME}_sc PROPERTIES
|
||||||
VERSION ${PROJECT_VERSION}
|
VERSION ${PROJECT_VERSION}
|
||||||
FRAMEWORK FALSE
|
FRAMEWORK FALSE
|
||||||
PUBLIC_HEADER "${LIB_HEADERS}" # specify the public headers
|
PUBLIC_HEADER "${LIB_HEADERS}" # specify the public headers
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project("tgfs-sim")
|
project("tgc-sim")
|
||||||
add_executable(tgfs-sim 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.
|
||||||
|
|
||||||
if(WITH_LLVM)
|
if(WITH_LLVM)
|
||||||
target_compile_definitions(tgfs-sim PRIVATE WITH_LLVM)
|
target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_LLVM)
|
||||||
target_link_libraries(tgfs-sim 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(tgfs-sim tgfs)
|
target_link_libraries(${PROJECT_NAME} tgc)
|
||||||
target_link_libraries(tgfs-sim jsoncpp)
|
target_link_libraries(${PROJECT_NAME} jsoncpp)
|
||||||
target_link_libraries(tgfs-sim ${Boost_LIBRARIES} )
|
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} )
|
||||||
if (Tcmalloc_FOUND)
|
if (Tcmalloc_FOUND)
|
||||||
target_link_libraries(tgfs-sim ${Tcmalloc_LIBRARIES})
|
target_link_libraries(${PROJECT_NAME} ${Tcmalloc_LIBRARIES})
|
||||||
endif(Tcmalloc_FOUND)
|
endif(Tcmalloc_FOUND)
|
||||||
|
|
||||||
install(TARGETS tgfs tgfs-sim
|
install(TARGETS 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