2019-04-03 15:04:46 +00:00
|
|
|
# CMAKE macros to set default CMAKE options and to show the
|
|
|
|
# resulting configuration.
|
|
|
|
|
2016-08-01 05:25:37 +00:00
|
|
|
macro(configure_project)
|
|
|
|
set(NAME ${PROJECT_NAME})
|
|
|
|
|
|
|
|
# features
|
2018-08-07 00:54:52 +00:00
|
|
|
eth_default_option(COVERAGE OFF)
|
2019-01-17 10:19:54 +00:00
|
|
|
eth_default_option(OSSFUZZ OFF)
|
2016-08-01 05:25:37 +00:00
|
|
|
|
|
|
|
# components
|
|
|
|
eth_default_option(TESTS ON)
|
|
|
|
eth_default_option(TOOLS ON)
|
|
|
|
|
|
|
|
# Define a matching property name of each of the "features".
|
|
|
|
foreach(FEATURE ${ARGN})
|
|
|
|
set(SUPPORT_${FEATURE} TRUE)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
include(EthBuildInfo)
|
|
|
|
create_build_info(${NAME})
|
|
|
|
print_config(${NAME})
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
macro(print_config NAME)
|
|
|
|
message("")
|
|
|
|
message("------------------------------------------------------------------------")
|
2019-04-03 15:04:46 +00:00
|
|
|
message("-- Configuring ${NAME} ${PROJECT_VERSION}")
|
2016-08-01 05:25:37 +00:00
|
|
|
message("------------------------------------------------------------------------")
|
|
|
|
message("-- CMake Version ${CMAKE_VERSION}")
|
|
|
|
message("-- CMAKE_BUILD_TYPE Build type ${CMAKE_BUILD_TYPE}")
|
|
|
|
message("-- TARGET_PLATFORM Target platform ${CMAKE_SYSTEM_NAME}")
|
|
|
|
message("--------------------------------------------------------------- features")
|
2018-08-07 00:54:52 +00:00
|
|
|
message("-- COVERAGE Coverage support ${COVERAGE}")
|
2016-08-01 05:25:37 +00:00
|
|
|
message("------------------------------------------------------------- components")
|
|
|
|
if (SUPPORT_TESTS)
|
|
|
|
message("-- TESTS Build tests ${TESTS}")
|
|
|
|
endif()
|
|
|
|
if (SUPPORT_TOOLS)
|
|
|
|
message("-- TOOLS Build tools ${TOOLS}")
|
|
|
|
endif()
|
2019-04-03 15:04:46 +00:00
|
|
|
message("------------------------------------------------------------------ flags")
|
|
|
|
message("-- OSSFUZZ ${OSSFUZZ}")
|
|
|
|
message("-- LLL ${LLL}")
|
2016-08-01 05:25:37 +00:00
|
|
|
message("------------------------------------------------------------------------")
|
|
|
|
message("")
|
|
|
|
endmacro()
|