mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-15 06:35:25 +02:00
Add POCO_VERBOSE_MESSAGES option (#1679)
Allows informational logging to be turned off. All find-related messages, warnings, errors, etc. are still always logged. The option is ON by default to preserve existing behaviour.
This commit is contained in:
parent
f8bacb47b5
commit
035177e1d2
@ -11,11 +11,15 @@ cmake_minimum_required(VERSION 3.0.0)
|
||||
|
||||
project(Poco)
|
||||
|
||||
option(POCO_VERBOSE_MESSAGES "Enable informational messages during configure" ON)
|
||||
|
||||
file(STRINGS "${PROJECT_SOURCE_DIR}/libversion" SHARED_LIBRARY_VERSION)
|
||||
|
||||
# Read the version information from the VERSION file
|
||||
file (STRINGS "${PROJECT_SOURCE_DIR}/VERSION" PACKAGE_VERSION )
|
||||
message(STATUS "Poco package version: ${PACKAGE_VERSION}")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Poco package version: ${PACKAGE_VERSION}")
|
||||
endif()
|
||||
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION})
|
||||
@ -117,31 +121,41 @@ endif()
|
||||
if(POCO_STATIC)
|
||||
set( LIB_MODE_DEFINITIONS -DPOCO_STATIC -DPOCO_NO_AUTOMATIC_LIBS)
|
||||
set( LIB_MODE STATIC )
|
||||
message(STATUS "Building static libraries")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Building static libraries")
|
||||
endif()
|
||||
else(POCO_STATIC)
|
||||
set( LIB_MODE SHARED )
|
||||
set( LIB_MODE_DEFINITIONS -DPOCO_NO_AUTOMATIC_LIBS)
|
||||
message(STATUS "Building dynamic libraries")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Building dynamic libraries")
|
||||
endif()
|
||||
endif(POCO_STATIC)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
message(STATUS "Building with tests")
|
||||
else ()
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Building with tests")
|
||||
endif()
|
||||
elseif (POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Building without tests")
|
||||
endif ()
|
||||
|
||||
if (ENABLE_SAMPLES)
|
||||
message(STATUS "Building with samples")
|
||||
else ()
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Building with samples")
|
||||
endif()
|
||||
elseif (POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Building without samples")
|
||||
endif ()
|
||||
|
||||
if (POCO_UNBUNDLED)
|
||||
add_definitions( -DPOCO_UNBUNDLED)
|
||||
message(STATUS "Build with using external sqlite, libz, pcre, expat ...")
|
||||
else ()
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Build with using external sqlite, libz, pcre, expat ...")
|
||||
endif()
|
||||
elseif (POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Build with using internal copy of sqlite, libz, pcre, expat, ...")
|
||||
endif ()
|
||||
|
||||
@ -308,28 +322,29 @@ install(
|
||||
# in tree build settings
|
||||
#configure_file(PocoBuildTreeSettings.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/PocoBuildTreeSettings.cmake @ONLY)
|
||||
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
|
||||
message(STATUS "Installation target path: ${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
|
||||
message(STATUS "Installation target path: ${CMAKE_INSTALL_PREFIX}")
|
||||
message(STATUS "")
|
||||
message(STATUS "Generated with config types: ${CMAKE_CONFIGURATION_TYPES}")
|
||||
message(STATUS "Setting Poco build type - ${CMAKE_BUILD_TYPE}")
|
||||
message(STATUS "")
|
||||
|
||||
message(STATUS "")
|
||||
message(STATUS "Generated with config types: ${CMAKE_CONFIGURATION_TYPES}")
|
||||
message(STATUS "Setting Poco build type - ${CMAKE_BUILD_TYPE}")
|
||||
message(STATUS "")
|
||||
message(STATUS "C_FLAGS: =${CMAKE_C_FLAGS}")
|
||||
message(STATUS "CMAKE_C_FLAGS_DEBUG:=${CMAKE_C_FLAGS_DEBUG}")
|
||||
message(STATUS "CMAKE_C_FLAGS_RELEASE:=${CMAKE_C_FLAGS_RELEASE}")
|
||||
message(STATUS "CMAKE_C_FLAGS_MINSIZEREL:=${CMAKE_C_FLAGS_MINSIZEREL}")
|
||||
message(STATUS "CMAKE_C_FLAGS_RELWITHDEBINFO:=${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
message(STATUS "")
|
||||
message(STATUS "")
|
||||
message(STATUS "CXX_FLAGS:=${CMAKE_CXX_FLAGS}")
|
||||
message(STATUS "CMAKE_CXX_FLAGS_DEBUG:=${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
message(STATUS "CMAKE_CXX_FLAGS_RELEASE:=${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
message(STATUS "CMAKE_CXX_FLAGS_MINSIZEREL:=${CMAKE_CXX_FLAGS_MINSIZEREL}")
|
||||
message(STATUS "CMAKE_CXX_FLAGS_RELWITHDEBINFO:=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
|
||||
message(STATUS "C_FLAGS: =${CMAKE_C_FLAGS}")
|
||||
message(STATUS "CMAKE_C_FLAGS_DEBUG:=${CMAKE_C_FLAGS_DEBUG}")
|
||||
message(STATUS "CMAKE_C_FLAGS_RELEASE:=${CMAKE_C_FLAGS_RELEASE}")
|
||||
message(STATUS "CMAKE_C_FLAGS_MINSIZEREL:=${CMAKE_C_FLAGS_MINSIZEREL}")
|
||||
message(STATUS "CMAKE_C_FLAGS_RELWITHDEBINFO:=${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
message(STATUS "")
|
||||
message(STATUS "")
|
||||
message(STATUS "CXX_FLAGS:=${CMAKE_CXX_FLAGS}")
|
||||
message(STATUS "CMAKE_CXX_FLAGS_DEBUG:=${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
message(STATUS "CMAKE_CXX_FLAGS_RELEASE:=${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
message(STATUS "CMAKE_CXX_FLAGS_MINSIZEREL:=${CMAKE_CXX_FLAGS_MINSIZEREL}")
|
||||
message(STATUS "CMAKE_CXX_FLAGS_RELWITHDEBINFO:=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
|
||||
foreach(component ${Poco_COMPONENTS})
|
||||
message(STATUS "Building: ${component}")
|
||||
endforeach()
|
||||
foreach(component ${Poco_COMPONENTS})
|
||||
message(STATUS "Building: ${component}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
@ -48,9 +48,11 @@ if(ENABLE_DATA_MYSQL)
|
||||
find_package(MySQL)
|
||||
if(MYSQL_FOUND)
|
||||
include_directories("${MYSQL_INCLUDE_DIR}")
|
||||
message(STATUS "MySQL Support Enabled")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "MySQL Support Enabled")
|
||||
endif()
|
||||
add_subdirectory( MySQL )
|
||||
else()
|
||||
elseif(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "MySQL Support Disabled - no MySQL library")
|
||||
endif(MYSQL_FOUND)
|
||||
endif(ENABLE_DATA_MYSQL)
|
||||
@ -59,9 +61,11 @@ if(ENABLE_DATA_POSTGRESQL)
|
||||
find_package(PostgreSQL)
|
||||
if(POSTGRESQL_FOUND)
|
||||
include_directories("${POSTGRESQL_INCLUDE_DIR}")
|
||||
message(STATUS "PostgreSQL Support Enabled")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "PostgreSQL Support Enabled")
|
||||
endif()
|
||||
add_subdirectory( PostgreSQL )
|
||||
else()
|
||||
elseif(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "PostgreSQL Support Disabled - no PostgreSQL library")
|
||||
endif(POSTGRESQL_FOUND)
|
||||
endif(ENABLE_DATA_POSTGRESQL)
|
||||
@ -70,14 +74,18 @@ if(ENABLE_DATA_ODBC)
|
||||
find_package(ODBC)
|
||||
if(WIN32 AND NOT WINCE)
|
||||
set(ODBC_LIBRARIES "odbc32" "odbccp32")
|
||||
message(STATUS "Windows native ODBC Support Enabled")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Windows native ODBC Support Enabled")
|
||||
endif()
|
||||
add_subdirectory( ODBC )
|
||||
else(WIN32 AND NOT WINCE)
|
||||
if(ODBC_FOUND)
|
||||
include_directories("${ODBC_INCLUDE_DIRECTORIES}")
|
||||
message(STATUS "ODBC Support Enabled")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "ODBC Support Enabled")
|
||||
endif()
|
||||
add_subdirectory( ODBC )
|
||||
else()
|
||||
elseif(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "ODBC Support Disabled - no ODBC runtime")
|
||||
endif()
|
||||
endif(WIN32 AND NOT WINCE)
|
||||
|
@ -120,7 +120,9 @@ if(UNIX AND NOT APPLE)
|
||||
INCLUDE (CheckLibraryExists)
|
||||
CHECK_LIBRARY_EXISTS(pthread pthread_setaffinity_np "pthread.h" HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
if(NOT HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
message(STATUS "Platform has not PTHREAD_SETAFFINITY_NP")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Platform has not PTHREAD_SETAFFINITY_NP")
|
||||
endif()
|
||||
else(HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
add_definitions(-DHAVE_PTHREAD_SETAFFINITY_NP)
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
@ -132,7 +134,9 @@ if(UNIX AND NOT APPLE)
|
||||
}" HAVE_THREE_PARAM_SCHED_SETAFFINITY)
|
||||
|
||||
if(HAVE_THREE_PARAM_SCHED_SETAFFINITY)
|
||||
message(STATUS "Platform has THREE PARAM at PTHREAD_SETAFFINITY_NP")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Platform has THREE PARAM at PTHREAD_SETAFFINITY_NP")
|
||||
endif()
|
||||
add_definitions(-DHAVE_THREE_PARAM_SCHED_SETAFFINITY)
|
||||
else(HAVE_THREE_PARAM_SCHED_SETAFFINITY)
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
@ -144,7 +148,9 @@ if(UNIX AND NOT APPLE)
|
||||
}" HAVE_TWO_PARAM_SCHED_SETAFFINITY)
|
||||
|
||||
if(HAVE_TWO_PARAM_SCHED_SETAFFINITY)
|
||||
message(STATUS "Platform has TWO PARAM at PTHREAD_SETAFFINITY_NP")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Platform has TWO PARAM at PTHREAD_SETAFFINITY_NP")
|
||||
endif()
|
||||
add_definitions(-DHAVE_TWO_PARAM_SCHED_SETAFFINITY)
|
||||
endif(HAVE_TWO_PARAM_SCHED_SETAFFINITY)
|
||||
|
||||
|
@ -16,9 +16,11 @@ if(ENABLE_DATA_MYSQL)
|
||||
find_package(MySQL)
|
||||
if(MYSQL_FOUND)
|
||||
target_include_directories(${BII_BLOCK_TARGET} INTERFACE "${MYSQL_INCLUDE_DIR}")
|
||||
message(STATUS "MySQL Support Enabled")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "MySQL Support Enabled")
|
||||
endif()
|
||||
include( MySQL )
|
||||
else()
|
||||
elseif(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "MySQL Support Disabled - no MySQL library")
|
||||
endif(MYSQL_FOUND)
|
||||
endif(ENABLE_DATA_MYSQL)
|
||||
@ -27,14 +29,18 @@ if(ENABLE_DATA_ODBC)
|
||||
find_package(ODBC)
|
||||
if(WIN32 AND NOT WINCE)
|
||||
set(ODBC_LIBRARIES "odbc32" "odbccp32")
|
||||
message(STATUS "Windows native ODBC Support Enabled")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Windows native ODBC Support Enabled")
|
||||
endif()
|
||||
include( ODBC )
|
||||
else(WIN32 AND NOT WINCE)
|
||||
if(ODBC_FOUND)
|
||||
target_include_directories(${BII_BLOCK_TARGET} INTERFACE "${ODBC_INCLUDE_DIRECTORIES}")
|
||||
message(STATUS "ODBC Support Enabled")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "ODBC Support Enabled")
|
||||
endif()
|
||||
include( ODBC )
|
||||
else()
|
||||
elseif(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "ODBC Support Disabled - no ODBC runtime")
|
||||
endif()
|
||||
endif(WIN32 AND NOT WINCE)
|
||||
|
@ -16,10 +16,14 @@ option(POCO_STATIC
|
||||
if(POCO_STATIC)
|
||||
target_compile_definitions(${BII_BLOCK_TARGET} INTERFACE -DPOCO_STATIC -DPOCO_NO_AUTOMATIC_LIBS)
|
||||
set( LIB_MODE STATIC )
|
||||
message(STATUS "Building static libraries")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Building static libraries")
|
||||
endif()
|
||||
else(POCO_STATIC)
|
||||
set( LIB_MODE SHARED )
|
||||
message(STATUS "Building dynamic libraries")
|
||||
if(POCO_VERBOSE_MESSAGES)
|
||||
message(STATUS "Building dynamic libraries")
|
||||
endif()
|
||||
endif(POCO_STATIC)
|
||||
|
||||
# OS Detection
|
||||
|
Loading…
x
Reference in New Issue
Block a user