|
|
|
@ -48,16 +48,22 @@ if(WITH_LLVM) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
# Define the library |
|
|
|
|
add_library(${PROJECT_NAME} SHARED ${LIB_SOURCES}) |
|
|
|
|
add_library(${PROJECT_NAME} ${LIB_SOURCES}) |
|
|
|
|
# list code gen dependencies |
|
|
|
|
if(TARGET ${CORE_NAME}_cpp) |
|
|
|
|
add_dependencies(${PROJECT_NAME} ${CORE_NAME}_cpp) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-shift-count-overflow) |
|
|
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
|
|
|
|
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-shift-count-overflow) |
|
|
|
|
endif() |
|
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC incl) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC softfloat scc-util jsoncpp) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC -Wl,--whole-archive dbt-core -Wl,--no-whole-archive) |
|
|
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC -Wl,--whole-archive dbt-core -Wl,--no-whole-archive) |
|
|
|
|
else() |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC dbt-core) |
|
|
|
|
endif() |
|
|
|
|
if(TARGET CONAN_PKG::elfio) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC CONAN_PKG::elfio) |
|
|
|
|
elseif(TARGET elfio::elfio) |
|
|
|
@ -98,16 +104,15 @@ if(WITH_LLVM) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${llvm_libs}) |
|
|
|
|
endif() |
|
|
|
|
# Links the target exe against the libraries |
|
|
|
|
target_link_libraries(${PROJECT_NAME} dbt-rise-tgc) |
|
|
|
|
#target_link_libraries(${PROJECT_NAME} jsoncpp) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC dbt-rise-tgc) |
|
|
|
|
if(TARGET Boost::program_options) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} Boost::program_options Boost::thread) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::program_options Boost::thread) |
|
|
|
|
else() |
|
|
|
|
target_link_libraries(${PROJECT_NAME} ${BOOST_program_options_LIBRARY} ${BOOST_thread_LIBRARY}) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${BOOST_program_options_LIBRARY} ${BOOST_thread_LIBRARY}) |
|
|
|
|
endif() |
|
|
|
|
target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS}) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_DL_LIBS}) |
|
|
|
|
if (Tcmalloc_FOUND) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} ${Tcmalloc_LIBRARIES}) |
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${Tcmalloc_LIBRARIES}) |
|
|
|
|
endif(Tcmalloc_FOUND) |
|
|
|
|
|
|
|
|
|
install(TARGETS tgc-sim |
|
|
|
|