Added CCI to build and support of conan.io
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/sc-components/cmake)
|
||||
|
||||
include(cmake/GitFunctions.cmake)
|
||||
include(GitFunctions)
|
||||
get_branch_from_git()
|
||||
|
||||
### set the directory names of the submodules
|
||||
@@ -13,10 +13,15 @@ set(GIT_SUBMODULE_DIR_sc-components .)
|
||||
set(GIT_SUBMODULE_BRANCH_sc-components ${GIT_BRANCH})
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(cmake/Submodules.cmake)
|
||||
include(Submodules)
|
||||
include(Conan)
|
||||
|
||||
#enable_testing()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(warnings "-Wall -Wextra -Werror")
|
||||
set(CMAKE_CXX_FLAG_RELEASE "-O2 -DNDEBUG")
|
||||
@@ -27,6 +32,8 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
set(warnings "/W4 /WX /EHsc")
|
||||
endif()
|
||||
|
||||
setup_conan()
|
||||
|
||||
# This line finds the boost lib and headers.
|
||||
set(Boost_NO_BOOST_CMAKE ON) # Don't do a find_package in config mode before searching for a regular boost install.
|
||||
find_package(Boost COMPONENTS program_options system thread REQUIRED)
|
||||
@@ -36,16 +43,22 @@ find_package(SystemC)
|
||||
if(SystemC_FOUND)
|
||||
add_definitions(-DWITH_SYSTEMC)
|
||||
include_directories(${SystemC_INCLUDE_DIRS})
|
||||
link_directories(${SystemC_LIBRARY_DIRS}
|
||||
)
|
||||
link_directories(${SystemC_LIBRARY_DIRS})
|
||||
else()
|
||||
message( FATAL_ERROR "SystemC library not found." )
|
||||
endif()
|
||||
|
||||
if(CCI_FOUND)
|
||||
include_directories(${CCI_INCLUDE_DIRS})
|
||||
link_directories(${CCI_LIBRARY_DIRS})
|
||||
else()
|
||||
message( FATAL_ERROR "SystemC CCI library not found." )
|
||||
endif()
|
||||
|
||||
if(SCV_FOUND)
|
||||
add_definitions(-DWITH_SCV)
|
||||
link_directories(${SCV_LIBRARY_DIRS})
|
||||
endif(SCV_FOUND)
|
||||
endif()
|
||||
|
||||
set(PROJECT_3PARTY_DIRS external sr_report sr_signal)
|
||||
include(sc-components/cmake/clang-format.cmake)
|
||||
|
Reference in New Issue
Block a user