aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/EthOptions.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/EthOptions.cmake')
-rw-r--r--cmake/EthOptions.cmake40
1 files changed, 40 insertions, 0 deletions
diff --git a/cmake/EthOptions.cmake b/cmake/EthOptions.cmake
new file mode 100644
index 00000000..b4efd6c9
--- /dev/null
+++ b/cmake/EthOptions.cmake
@@ -0,0 +1,40 @@
+macro(configure_project)
+ set(NAME ${PROJECT_NAME})
+
+ # features
+ eth_default_option(PROFILING OFF)
+
+ # 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("------------------------------------------------------------------------")
+ message("-- Configuring ${NAME}")
+ 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")
+ message("-- PROFILING Profiling support ${PROFILING}")
+ message("------------------------------------------------------------- components")
+if (SUPPORT_TESTS)
+ message("-- TESTS Build tests ${TESTS}")
+endif()
+if (SUPPORT_TOOLS)
+ message("-- TOOLS Build tools ${TOOLS}")
+endif()
+ message("------------------------------------------------------------------------")
+ message("")
+endmacro()