HIFIVE1-VP/CMakeLists.txt

39 lines
1.3 KiB
CMake
Raw Normal View History

2017-08-27 12:10:38 +02:00
cmake_minimum_required(VERSION 2.8.12)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
### set the directory names of the submodules
set(GIT_SUBMODULES elfio libGIS sc-components)
set(GIT_SUBMODULE_DIR_sc-components .)
set(GIT_SUBMODULE_DIR_dbt-core .)
### set each submodules's commit or tag that is to be checked out
### (leave empty if you want master)
#set(GIT_SUBMODULE_VERSION_sc-comp 3af6b9836589b082c19d9131c5d0b7afa8ddd7cd)
set(GIT_SUBMODULE_BRANCH_sc-components "develop")
2017-08-27 12:10:38 +02:00
include(GNUInstallDirs)
include(cmake/Submodules.cmake)
#enable_testing()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(warnings "-Wall -Wextra -Werror")
set(CMAKE_CXX_FLAG_RELEASE "-O3 -DNDEBUG")
set(CMAKE_C_FLAG_RELEASE "-O3 -DNDEBUG")
2017-08-27 12:10:38 +02:00
set(CMAKE_CXX_FLAG_DEBUG "-Og")
set(CMAKE_C_FLAG_DEBUG "-Og")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(warnings "/W4 /WX /EHsc")
endif()
FIND_PACKAGE(Threads)
FIND_PACKAGE(Tcmalloc)
2017-08-27 12:10:38 +02:00
2017-09-22 11:23:23 +02:00
set(PROJECT_3PARTY_DIRS external sr_report sr_signal)
include(sc-components/cmake/clang-format.cmake)
2017-08-27 12:10:38 +02:00
add_subdirectory(external)
add_subdirectory(dbt-core)
add_subdirectory(sc-components)
add_subdirectory(riscv)
2017-09-21 20:29:23 +02:00
add_subdirectory(riscv.sc)