mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 10:23:50 +01:00
CMake messages changed to message( STATUS "..." ) (#190)
This commit is contained in:
parent
ac37076327
commit
82df2168aa
22
Build.cmake
22
Build.cmake
@ -22,8 +22,8 @@ SET(ACTIVE_CPP0xx_DIR "Release")
|
||||
# 1) http://kjellkod.wordpress.com/2013/09/23/experimental-g3log-with-clang/
|
||||
# 2) https://github.com/maidsafe/MaidSafe/wiki/Hacking-with-Clang-llvm-abi-and-llvm-libc
|
||||
IF (${CMAKE_CXX_COMPILER_ID} MATCHES ".*Clang")
|
||||
MESSAGE("")
|
||||
MESSAGE("cmake for Clang ")
|
||||
message( STATUS "" )
|
||||
message( STATUS "cmake for Clang " )
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++14 -Wunused -D_GLIBCXX_USE_NANOSLEEP")
|
||||
IF (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++ -pthread")
|
||||
@ -46,7 +46,7 @@ IF (${CMAKE_CXX_COMPILER_ID} MATCHES ".*Clang")
|
||||
|
||||
|
||||
ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
MESSAGE("cmake for GCC ")
|
||||
message( STATUS "cmake for GCC " )
|
||||
IF (APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused -std=c++14 -pthread -D_GLIBCXX_USE_NANOSLEEP")
|
||||
ELSEIF (MINGW)
|
||||
@ -78,13 +78,13 @@ IF (MSVC OR MINGW)
|
||||
MESSAGE(STATUS "- MSVC: Set variadic max to 10 for MSVC compatibility")
|
||||
# Remember to set set target properties if using GTEST similar to done below on target "unit_test"
|
||||
# "set_target_properties(unit_test PROPERTIES COMPILE_DEFINITIONS "GTEST_USE_OWN_TR1_TUPLE=0")
|
||||
MESSAGE("")
|
||||
MESSAGE("Windows: Run cmake with the appropriate Visual Studio generator")
|
||||
MESSAGE("The generator is one number below the official version number. I.e. VS2013 -> Generator 'Visual Studio 12'")
|
||||
MESSAGE("I.e. if VS2013: Please run the command [cmake -DCMAKE_BUILD_TYPE=Release -G \"Visual Studio 12\" ..]")
|
||||
MESSAGE("if cmake finishes OK, do 'msbuild g3log.sln /p:Configuration=Release'")
|
||||
MESSAGE("then run 'Release\\g3log-FATAL-*' examples")
|
||||
MESSAGE("")
|
||||
message( STATUS "" )
|
||||
message( STATUS "Windows: Run cmake with the appropriate Visual Studio generator" )
|
||||
message( STATUS "The generator is one number below the official version number. I.e. VS2013 -> Generator 'Visual Studio 12'" )
|
||||
MESSAGE( STATUS "I.e. if VS2013: Please run the command [cmake -DCMAKE_BUILD_TYPE=Release -G \"Visual Studio 12\" ..]")
|
||||
message( STATUS "if cmake finishes OK, do 'msbuild g3log.sln /p:Configuration=Release'" )
|
||||
message( STATUS "then run 'Release\\g3log-FATAL-*' examples" )
|
||||
message( STATUS "" )
|
||||
ENDIF()
|
||||
|
||||
# GENERIC STEPS
|
||||
@ -120,7 +120,7 @@ ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(${G3LOG_LIBRARY}_VERSION_STRING ${VERSION})
|
||||
MESSAGE("Creating ${G3LOG_LIBRARY} VERSION: " ${VERSION})
|
||||
MESSAGE( STATUS "Creating ${G3LOG_LIBRARY} VERSION: ${VERSION}" )
|
||||
SET_TARGET_PROPERTIES(g3logger PROPERTIES LINKER_LANGUAGE CXX SOVERSION ${VERSION})
|
||||
|
||||
set_target_properties(${G3LOG_LIBRARY} PROPERTIES
|
||||
|
@ -56,17 +56,17 @@ endif()
|
||||
|
||||
project (g3log)
|
||||
|
||||
message("Build type: ${CMAKE_BUILD_TYPE}")
|
||||
message("Configuration types: ${CMAKE_CONFIGURATION_TYPES}")
|
||||
message( STATUS "Build type: ${CMAKE_BUILD_TYPE}" )
|
||||
message( STATUS "Configuration types: ${CMAKE_CONFIGURATION_TYPES}" )
|
||||
|
||||
# Detect 64 or 32 bit
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
# 64-bit project
|
||||
SET(64_BIT_OS TRUE)
|
||||
MESSAGE("A 64-bit OS detected")
|
||||
message( STATUS "A 64-bit OS detected" )
|
||||
else()
|
||||
SET(64_BIT_OS FALSE)
|
||||
MESSAGE("A 32-bit OS detected")
|
||||
message( STATUS "A 32-bit OS detected" )
|
||||
endif()
|
||||
|
||||
|
||||
@ -77,9 +77,9 @@ IF ( NOT VERSION )
|
||||
execute_process(COMMAND powershell "(git rev-list --branches HEAD | Measure-Object -line).Lines" OUTPUT_VARIABLE GIT_VERSION WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
ELSE()
|
||||
IF(UNIX OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
message("nix: Extracting git software version")
|
||||
message( STATUS "nix: Extracting git software version" )
|
||||
ELSE()
|
||||
message("unknown platform: extracting git software version")
|
||||
message( STATUS "unknown platform: extracting git software version" )
|
||||
ENDIF()
|
||||
execute_process(COMMAND bash "-c" "git rev-list --branches HEAD | wc -l | tr -d ' ' | tr -d '\n'" OUTPUT_VARIABLE GIT_VERSION WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
ENDIF()
|
||||
@ -87,14 +87,14 @@ IF ( NOT VERSION )
|
||||
SET(MINOR_VERSION 3)
|
||||
math(EXPR VERSION-BASE ${GIT_VERSION}/255)
|
||||
math(EXPR VERSION-REMAINDER ${GIT_VERSION}%255)
|
||||
message("git build version: ${GIT_VERSION}")
|
||||
message("version base: ${VERSION-BASE}")
|
||||
message("version remainder: ${VERSION-REMAINDER}")
|
||||
message( STATUS "git build version: ${GIT_VERSION}" )
|
||||
message( STATUS "version base: ${VERSION-BASE}" )
|
||||
message( STATUS "version remainder: ${VERSION-REMAINDER}" )
|
||||
# SET(BUILD_NUMBER ${GIT_VERSION})
|
||||
SET(BUILD_NUMBER ${VERSION-BASE})
|
||||
SET(VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER}-${VERSION-REMAINDER})
|
||||
ENDIF()
|
||||
MESSAGE("Software Version: ${VERSION}")
|
||||
message( STATUS "Software Version: ${VERSION}" )
|
||||
|
||||
|
||||
|
||||
@ -161,13 +161,13 @@ ENDIF()
|
||||
|
||||
|
||||
IF (NOT MSVC)
|
||||
MESSAGE("\n\n
|
||||
message( STATUS "\n\n
|
||||
*******************************************************************
|
||||
Please do 'make clean-cmake' before next cmake generation.
|
||||
It is a good idea to purge your build directory of CMake
|
||||
generated cache files
|
||||
*******************************************************************
|
||||
")
|
||||
" )
|
||||
add_custom_target(clean-cmake
|
||||
COMMAND ${CMAKE_COMMAND} -P ${g3log_SOURCE_DIR}/CleanAll.cmake
|
||||
)
|
||||
|
@ -23,7 +23,7 @@ SET(CMAKE_INSTALL_HEADERDIR include CACHE PATH "Output dir for headers")
|
||||
|
||||
IF (${CPACK_INSTALL_PREFIX}.x STREQUAL ".x")
|
||||
SET(CPACK_INSTALL_PREFIX "/usr/local")
|
||||
MESSAGE("CPACK_INSTALL_PREFIX: ${CPACK_INSTALL_PREFIX}")
|
||||
message( STATUS "CPACK_INSTALL_PREFIX: ${CPACK_INSTALL_PREFIX}" )
|
||||
ENDIF()
|
||||
|
||||
|
||||
@ -60,23 +60,23 @@ SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "G3Log C++ headers")
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
SET(CPACK_GENERATOR "DEB")
|
||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "KjellKod - Kjell Hedstrom")
|
||||
MESSAGE("\nTo create installation package: ")
|
||||
MESSAGE("make package")
|
||||
message( STATUS "\nTo create installation package: " )
|
||||
message( STATUS "make package" )
|
||||
ENDIF()
|
||||
|
||||
|
||||
MESSAGE("\nOption to install using 'sudo make install")
|
||||
MESSAGE("Installation locations: ")
|
||||
MESSAGE("====================")
|
||||
MESSAGE("Headers: ${CPACK_INSTALL_PREFIX}/${CMAKE_INSTALL_HEADERDIR}")
|
||||
MESSAGE("Library installation directory: ${CPACK_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
message( STATUS "\nOption to install using 'sudo make install" )
|
||||
message( STATUS "Installation locations: " )
|
||||
message( STATUS "====================" )
|
||||
message( STATUS "Headers: ${CPACK_INSTALL_PREFIX}/${CMAKE_INSTALL_HEADERDIR}" )
|
||||
message( STATUS "Library installation directory: ${CPACK_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" )
|
||||
|
||||
MESSAGE("For more information please see g3log/CPackLists.txt\n\n")
|
||||
MESSAGE("To install: sudo dpkg -i g3log-***Linux.deb")
|
||||
MESSAGE("To list package contents: sudo dpkg --contents g3log-***Linux.deb")
|
||||
message( STATUS "For more information please see g3log/CPackLists.txt\n\n" )
|
||||
message( STATUS "To install: sudo dpkg -i g3log-***Linux.deb" )
|
||||
message( STATUS "To list package contents: sudo dpkg --contents g3log-***Linux.deb" )
|
||||
|
||||
MESSAGE("List content of the installed package: sudo dpkg -L g3log")
|
||||
MESSAGE("To remove: sudo dpkg -r g3log")
|
||||
message( STATUS "List content of the installed package: sudo dpkg -L g3log" )
|
||||
message( STATUS "To remove: sudo dpkg -r g3log" )
|
||||
|
||||
# NOTE: to change installation locations you can use the settings below
|
||||
# examples:
|
||||
|
@ -15,7 +15,7 @@ set(cmake_generated ${CMAKE_BINARY_DIR}/CMakeCache.txt
|
||||
|
||||
foreach(file ${cmake_generated})
|
||||
if (EXISTS ${file})
|
||||
MESSAGE("Removing: ${file}")
|
||||
message( STATUS "Removing: ${file}" )
|
||||
file(REMOVE_RECURSE ${file})
|
||||
endif()
|
||||
endforeach(file)
|
@ -18,9 +18,9 @@
|
||||
|
||||
|
||||
|
||||
MESSAGE("")
|
||||
MESSAGE("COMPILE_DEFINITIONS:\n\t[${G3_DEFINITIONS}]")
|
||||
MESSAGE("")
|
||||
message( STATUS "" )
|
||||
message( STATUS "COMPILE_DEFINITIONS:\n\t[${G3_DEFINITIONS}]" )
|
||||
message( STATUS "" )
|
||||
SET(GENERATED_G3_DEFINITIONS "${CMAKE_CURRENT_BINARY_DIR}/include/g3log/generated_definitions.hpp")
|
||||
file(REMOVE ${GENERATED_G3_DEFINITIONS} )
|
||||
FILE(WRITE ${GENERATED_G3_DEFINITIONS} "// AUTO GENERATED MACRO DEFINITIONS FOR G3LOG\n\n")
|
||||
@ -32,9 +32,9 @@ FOREACH(definition ${G3_DEFINITIONS} )
|
||||
FILE(APPEND ${GENERATED_G3_DEFINITIONS} "#define ${definition}\n")
|
||||
ENDFOREACH(definition)
|
||||
|
||||
MESSAGE("Generated ${GENERATED_G3_DEFINITIONS}")
|
||||
message( STATUS "Generated ${GENERATED_G3_DEFINITIONS}" )
|
||||
file(READ ${GENERATED_G3_DEFINITIONS} generated_content)
|
||||
|
||||
MESSAGE("******************** START *************************")
|
||||
message( STATUS "******************** START *************************" )
|
||||
MESSAGE(${generated_content})
|
||||
MESSAGE("******************** END *************************")
|
||||
message( STATUS "******************** END *************************" )
|
||||
|
@ -31,11 +31,11 @@ option (USE_DYNAMIC_LOGGING_LEVELS
|
||||
"Turn ON/OFF log levels. An disabled level will not push logs of that level to the sink. By default dynamic logging is disabled" OFF)
|
||||
IF(USE_DYNAMIC_LOGGING_LEVELS)
|
||||
LIST(APPEND G3_DEFINITIONS G3_DYNAMIC_LOGGING)
|
||||
MESSAGE("-DUSE_DYNAMIC_LOGGING_LEVELS=ON")
|
||||
MESSAGE("\tDynamic logging levels is used")
|
||||
MESSAGE("\tUse [g3::addLogLevel(LEVEL boolean)] to enable/disable logging on specified levels\n\n")
|
||||
message( STATUS "-DUSE_DYNAMIC_LOGGING_LEVELS=ON" )
|
||||
message( STATUS "\tDynamic logging levels is used" )
|
||||
message( STATUS "\tUse [g3::addLogLevel(LEVEL boolean)] to enable/disable logging on specified levels\n\n" )
|
||||
ELSE()
|
||||
MESSAGE("-DUSE_DYNAMIC_LOGGING_LEVELS=OFF")
|
||||
message( STATUS "-DUSE_DYNAMIC_LOGGING_LEVELS=OFF" )
|
||||
ENDIF(USE_DYNAMIC_LOGGING_LEVELS)
|
||||
|
||||
|
||||
@ -48,10 +48,10 @@ option (CHANGE_G3LOG_DEBUG_TO_DBUG
|
||||
IF(CHANGE_G3LOG_DEBUG_TO_DBUG)
|
||||
LIST(APPEND G3_DEFINITIONS CHANGE_G3LOG_DEBUG_TO_DBUG)
|
||||
LIST(APPEND G3_DEFINITIONS "G3LOG_DEBUG DBUG")
|
||||
MESSAGE("-DCHANGE_G3LOG_DEBUG_TO_DBUG=ON DBUG instead of DEBUG logging level is used")
|
||||
message( STATUS "-DCHANGE_G3LOG_DEBUG_TO_DBUG=ON DBUG instead of DEBUG logging level is used" )
|
||||
ELSE()
|
||||
LIST(APPEND G3_DEFINITIONS "G3LOG_DEBUG DEBUG")
|
||||
MESSAGE("-DCHANGE_G3LOG_DEBUG_TO_DBUG=OFF \t(Debuggin logging level is 'DEBUG')")
|
||||
message( STATUS "-DCHANGE_G3LOG_DEBUG_TO_DBUG=OFF \t(Debuggin logging level is 'DEBUG')" )
|
||||
ENDIF(CHANGE_G3LOG_DEBUG_TO_DBUG)
|
||||
|
||||
|
||||
@ -65,15 +65,15 @@ option (ENABLE_FATAL_SIGNALHANDLING
|
||||
IF(NOT ENABLE_FATAL_SIGNALHANDLING)
|
||||
LIST(APPEND G3_DEFINITIONS DISABLE_FATAL_SIGNALHANDLING)
|
||||
|
||||
MESSAGE("-DENABLE_FATAL_SIGNALHANDLING=OFF Fatal signal handler is disabled")
|
||||
message( STATUS "-DENABLE_FATAL_SIGNALHANDLING=OFF Fatal signal handler is disabled" )
|
||||
ELSE()
|
||||
MESSAGE("-DENABLE_FATAL_SIGNALHANDLING=ON\tFatal signal handler is enabled")
|
||||
message( STATUS "-DENABLE_FATAL_SIGNALHANDLING=ON\tFatal signal handler is enabled" )
|
||||
ENDIF(NOT ENABLE_FATAL_SIGNALHANDLING)
|
||||
|
||||
# Option for building as a static or shared library in all platforms
|
||||
option (G3_SHARED_LIB "Build shared library" ON)
|
||||
IF(G3_SHARED_LIB)
|
||||
MESSAGE("-DG3_SHARED_LIB=ON\tBuild shared library")
|
||||
message( STATUS "-DG3_SHARED_LIB=ON\tBuild shared library" )
|
||||
ELSE()
|
||||
MESSAGE("-DG3_SHARED_LIB=OFF\tBuild static library")
|
||||
ENDIF()
|
||||
@ -89,9 +89,9 @@ IF (MSVC OR MINGW)
|
||||
|
||||
IF(NOT ENABLE_VECTORED_EXCEPTIONHANDLING)
|
||||
LIST(APPEND G3_DEFINITIONS DISABLE_VECTORED_EXCEPTIONHANDLING)
|
||||
MESSAGE("-DENABLE_VECTORED_EXCEPTIONHANDLING=OFF Vectored exception handling is disabled")
|
||||
message( STATUS "-DENABLE_VECTORED_EXCEPTIONHANDLING=OFF Vectored exception handling is disabled" )
|
||||
ELSE()
|
||||
MESSAGE("-DENABLE_VECTORED_EXCEPTIONHANDLING=ON\t\t\tVectored exception handling is enabled")
|
||||
message( STATUS "-DENABLE_VECTORED_EXCEPTIONHANDLING=ON\t\t\tVectored exception handling is enabled" )
|
||||
ENDIF(NOT ENABLE_VECTORED_EXCEPTIONHANDLING)
|
||||
|
||||
|
||||
@ -104,13 +104,13 @@ IF (MSVC OR MINGW)
|
||||
"Enable Visual Studio break point when receiving a fatal exception. In __DEBUG mode only" OFF)
|
||||
IF(DEBUG_BREAK_AT_FATAL_SIGNAL)
|
||||
LIST(APPEND G3_DEFINITIONS DEBUG_BREAK_AT_FATAL_SIGNAL)
|
||||
MESSAGE("-DDEBUG_BREAK_AT_FATAL_SIGNAL=ON Break point for fatal signal is enabled for __DEBUG.")
|
||||
message( STATUS "-DDEBUG_BREAK_AT_FATAL_SIGNAL=ON Break point for fatal signal is enabled for __DEBUG." )
|
||||
ELSE()
|
||||
MESSAGE("-DDEBUG_BREAK_AT_FATAL_SIGNAL=OFF\t\t\tBreak point for fatal signal is disabled")
|
||||
message( STATUS "-DDEBUG_BREAK_AT_FATAL_SIGNAL=OFF\t\t\tBreak point for fatal signal is disabled" )
|
||||
ENDIF(DEBUG_BREAK_AT_FATAL_SIGNAL)
|
||||
|
||||
ENDIF (MSVC OR MINGW)
|
||||
MESSAGE("\n\n\n")
|
||||
message( STATUS "\n\n\n" )
|
||||
|
||||
|
||||
|
||||
|
@ -31,8 +31,8 @@
|
||||
|
||||
|
||||
IF (ADD_FATAL_EXAMPLE)
|
||||
MESSAGE("-DADD_FATAL_EXAMPLE=ON")
|
||||
MESSAGE("\t\t[contract][sigsegv][fatal choice] are examples of when g3log comes in handy\n")
|
||||
message( STATUS "-DADD_FATAL_EXAMPLE=ON" )
|
||||
message( STATUS "\t\t[contract][sigsegv][fatal choice] are examples of when g3log comes in handy\n" )
|
||||
include_directories (${DIR_EXAMPLE})
|
||||
add_executable(g3log-FATAL-contract ${DIR_EXAMPLE}/main_contract.cpp)
|
||||
add_executable(g3log-FATAL-sigsegv ${DIR_EXAMPLE}/main_sigsegv.cpp)
|
||||
@ -42,5 +42,5 @@
|
||||
target_link_libraries(g3log-FATAL-sigsegv ${G3LOG_LIBRARY} ${EXAMPLE_PLATFORM_LINK_LIBRIES})
|
||||
target_link_libraries(g3log-FATAL-choice ${G3LOG_LIBRARY} ${EXAMPLE_PLATFORM_LINK_LIBRIES})
|
||||
ELSE()
|
||||
MESSAGE("-DADD_SIMPLE_EXAMPLE=OFF")
|
||||
message( STATUS "-DADD_SIMPLE_EXAMPLE=OFF" )
|
||||
ENDIF (ADD_FATAL_EXAMPLE)
|
||||
|
@ -23,7 +23,7 @@
|
||||
IF (ADD_G3LOG_BENCH_PERFORMANCE)
|
||||
set(DIR_PERFORMANCE ${g3log_SOURCE_DIR}/test_performance)
|
||||
|
||||
MESSAGE("-DADD_G3LOG_BENCH_PERFORMANCE=ON")
|
||||
message( STATUS "-DADD_G3LOG_BENCH_PERFORMANCE=ON" )
|
||||
include_directories (${DIR_PERFORMANCE})
|
||||
|
||||
# MEAN PERFORMANCE TEST
|
||||
@ -46,7 +46,7 @@
|
||||
${G3LOG_LIBRARY} ${PLATFORM_LINK_LIBRIES})
|
||||
|
||||
ELSE()
|
||||
MESSAGE("-DADD_G3LOG_BENCH_PERFORMANCE=OFF")
|
||||
message( STATUS "-DADD_G3LOG_BENCH_PERFORMANCE=OFF" )
|
||||
ENDIF(ADD_G3LOG_BENCH_PERFORMANCE)
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
# =========================
|
||||
IF (ADD_G3LOG_UNIT_TEST)
|
||||
set(DIR_UNIT_TEST ${g3log_SOURCE_DIR}/test_unit)
|
||||
MESSAGE("-DADD_G3LOG_UNIT_TEST=ON")
|
||||
message( STATUS "-DADD_G3LOG_UNIT_TEST=ON" )
|
||||
set(GTEST_DIR ${g3log_SOURCE_DIR}/3rdParty/gtest/gtest-1.7.0)
|
||||
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_DIR}/include ${GTEST_DIR} ${GTEST_DIR}/src)
|
||||
include_directories(${GTEST_INCLUDE_DIRECTORIES})
|
||||
@ -80,5 +80,5 @@
|
||||
target_link_libraries(test_dynamic_loaded_shared_lib ${G3LOG_LIBRARY} -ldl gtest_170_lib )
|
||||
ENDIF()
|
||||
ELSE()
|
||||
MESSAGE("-DADD_G3LOG_UNIT_TEST=OFF")
|
||||
message( STATUS "-DADD_G3LOG_UNIT_TEST=OFF" )
|
||||
ENDIF (ADD_G3LOG_UNIT_TEST)
|
||||
|
Loading…
Reference in New Issue
Block a user