cmake: Cleanup of cmake messages.

* Removed unessesary spaces.
    * Changed INFO to STATUS since INFO is not a cmake message
      keyword.
    * Changed a few messages from status/info to warning.
    * Fixed trailing carriage return on yuidoc execute_process.
    * Removed my debug messages for CXX vs C.

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck 2016-09-05 21:57:41 -07:00
parent 09b1bb9a60
commit 2b6dd5f3fd
8 changed files with 24 additions and 25 deletions

View File

@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.8.11)
project (upm) project (upm)
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message("WARNING: building into sources dir can be risky, prefer other directory") message (WARNING "Building into sources dir can be risky, prefer other directory")
endif () endif ()
find_package (Threads REQUIRED) find_package (Threads REQUIRED)
@ -11,7 +11,7 @@ find_package (PkgConfig REQUIRED)
# Force a libmraa search and minimum required version every time a config is generated # Force a libmraa search and minimum required version every time a config is generated
unset(MRAA_FOUND CACHE) unset(MRAA_FOUND CACHE)
pkg_check_modules (MRAA REQUIRED mraa>=1.1.1) pkg_check_modules (MRAA REQUIRED mraa>=1.1.1)
message (INFO " found mraa version: ${MRAA_VERSION}") message (STATUS "found mraa version: ${MRAA_VERSION}")
# Appends the cmake/modules path to MAKE_MODULE_PATH variable. # Appends the cmake/modules path to MAKE_MODULE_PATH variable.
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
@ -28,7 +28,7 @@ if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_-128-
set (VERSION "v0.8.0-dirty") set (VERSION "v0.8.0-dirty")
endif () endif ()
message (INFO " - UPM Version ${VERSION}") message (STATUS "UPM Version ${VERSION}")
# Parse the version information into pieces. # Parse the version information into pieces.
string (REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${VERSION}") string (REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${VERSION}")
@ -77,7 +77,7 @@ endif ()
# Detect arch # Detect arch
include (TargetArch) include (TargetArch)
target_architecture (DETECTED_ARCH) target_architecture (DETECTED_ARCH)
message( INFO " - Target arch is ${DETECTED_ARCH}") message (STATUS "Target arch is ${DETECTED_ARCH}")
#-march=native for ARM when not defined/forced #-march=native for ARM when not defined/forced
if (DETECTED_ARCH MATCHES "arm.*" AND NOT CMAKE_CXX_FLAGS MATCHES "-march") if (DETECTED_ARCH MATCHES "arm.*" AND NOT CMAKE_CXX_FLAGS MATCHES "-march")
@ -182,7 +182,7 @@ if (IPK)
set (TARGET_ARCH ${DETECTED_ARCH}) set (TARGET_ARCH ${DETECTED_ARCH})
endif () endif ()
endif () endif ()
message (INFO " - Package arch is ${TARGET_ARCH}") message (STATUS "Package arch is ${TARGET_ARCH}")
set(CPACK_GENERATOR "DEB") set(CPACK_GENERATOR "DEB")
set(OPKG_ARCH ${TARGET_ARCH}) set(OPKG_ARCH ${TARGET_ARCH})
@ -207,7 +207,7 @@ if (IPK)
endif() endif()
if (RPM) if (RPM)
message (INFO " - RPM packaging enabled for ${DETECTED_ARCH}") message (STATUS "RPM packaging enabled for ${DETECTED_ARCH}")
set(CPACK_PACKAGE_VERSION ${VERSION}) set(CPACK_PACKAGE_VERSION ${VERSION})
set(CPACK_GENERATOR "RPM") set(CPACK_GENERATOR "RPM")
set(CPACK_PACKAGE_NAME "upm") set(CPACK_PACKAGE_NAME "upm")

View File

@ -95,7 +95,7 @@ IF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
# $ dpkg --print-architecture # $ dpkg --print-architecture
FIND_PROGRAM(DPKG_CMD dpkg) FIND_PROGRAM(DPKG_CMD dpkg)
IF(NOT DPKG_CMD) IF(NOT DPKG_CMD)
MESSAGE(STATUS "Can not find dpkg in your path, default to i386.") MESSAGE(WARNING "Can not find dpkg in your path, default to i386.")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386) SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
ENDIF(NOT DPKG_CMD) ENDIF(NOT DPKG_CMD)
EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture

View File

@ -89,8 +89,8 @@ if (NODEJS_EXECUTABLE)
endif () endif ()
string (REGEX REPLACE "\n" "" NODE_VERSION_STRING ${NODE_VERSION_STRING}) string (REGEX REPLACE "\n" "" NODE_VERSION_STRING ${NODE_VERSION_STRING})
string (REGEX REPLACE "\n" "" V8_VERSION_STRING ${V8_VERSION_STRING}) string (REGEX REPLACE "\n" "" V8_VERSION_STRING ${V8_VERSION_STRING})
message ("INFO - Node version is " ${NODE_VERSION_STRING}) message (STATUS "Node version is ${NODE_VERSION_STRING}")
message ("INFO - Node using v8 " ${V8_VERSION_STRING}) message (STATUS "Node using v8 ${V8_VERSION_STRING}")
mark_as_advanced (NODEJS_EXECUTABLE) mark_as_advanced (NODEJS_EXECUTABLE)
endif () endif ()

View File

@ -23,7 +23,7 @@ if (SPHINX_EXECUTABLE)
OUTPUT_VARIABLE SPHINX_VERSION) OUTPUT_VARIABLE SPHINX_VERSION)
if(SPHINX_VERSION) if(SPHINX_VERSION)
string(REGEX MATCH "([0-9]\\.[0-9]\\.[0-9])" SPHINX_VERSION_STR ${SPHINX_VERSION}) string(REGEX MATCH "([0-9]\\.[0-9]\\.[0-9])" SPHINX_VERSION_STR ${SPHINX_VERSION})
message ("INFO - Sphinx version is " ${SPHINX_VERSION_STR}) message (STATUS "Sphinx version is ${SPHINX_VERSION_STR}")
endif() endif()
endif () endif ()

View File

@ -14,9 +14,11 @@ find_package_handle_standard_args (Yuidoc DEFAULT_MSG
# Get Yuidoc version # Get Yuidoc version
if (YUIDOC_EXECUTABLE) if (YUIDOC_EXECUTABLE)
execute_process(COMMAND ${YUIDOC_EXECUTABLE} --version execute_process(COMMAND ${YUIDOC_EXECUTABLE} --version
ERROR_VARIABLE YUIDOC_VERSION) ERROR_VARIABLE YUIDOC_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
if(YUIDOC_VERSION) if(YUIDOC_VERSION)
message ("INFO - Yuidoc version is " ${YUIDOC_VERSION}) message (STATUS "Yuidoc version is ${YUIDOC_VERSION}")
endif() endif()
endif () endif ()

View File

@ -41,7 +41,7 @@ macro(add_custom_example example_bin example_src example_module_list)
target_link_libraries (${example_bin} ${module}) target_link_libraries (${example_bin} ${module})
endforeach() endforeach()
else() else()
MESSAGE(INFO " Ignored ${example_bin}") message (WARNING "Ignored ${example_bin}")
set (example_bin "") set (example_bin "")
endif() endif()
endmacro() endmacro()
@ -66,7 +66,7 @@ macro(add_example example_name)
endif() endif()
endif() endif()
else() else()
MESSAGE(INFO " Ignored ${example_bin}") message (WARNING "Ignored ${example_bin}")
endif() endif()
endmacro() endmacro()

View File

@ -41,7 +41,7 @@ macro(add_custom_example example_bin example_src example_module_list)
target_link_libraries (${example_bin} ${module}-c) target_link_libraries (${example_bin} ${module}-c)
endforeach() endforeach()
else() else()
MESSAGE(INFO " Ignored ${example_bin}") message (WARNING "Ignored ${example_bin}")
set (example_bin "") set (example_bin "")
endif() endif()
endmacro() endmacro()
@ -66,7 +66,7 @@ macro(add_example example_name)
endif() endif()
endif() endif()
else() else()
MESSAGE(INFO " Ignored ${example_bin}") message (WARNING "Ignored ${example_bin}")
endif() endif()
endmacro() endmacro()

View File

@ -84,7 +84,7 @@ macro(upm_swig_node)
if (${V8_VERSION_MAJOR} GREATER 3) if (${V8_VERSION_MAJOR} GREATER 3)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
message(FATAL_ERROR " **ERROR** GCC 4.7 or above is required to compile jsupm_${libname} ") message(FATAL_ERROR "FATAL_ERROR: GCC 4.7 or above is required to compile jsupm_${libname} ")
endif() endif()
endif() endif()
@ -95,7 +95,7 @@ macro(upm_swig_node)
if (CMAKE_VERSION VERSION_LESS "3.1") if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
message (FATAL_ERROR " FATAL ERROR: GNU gcc compiler is also too old (need 4.7+, but ${CMAKE_CXX_COMPILER_VERSION}) and does not support C++11 standard.") message (FATAL_ERROR "FATAL_ERROR: GNU gcc compiler is also too old (need 4.7+, but ${CMAKE_CXX_COMPILER_VERSION}) and does not support C++11 standard.")
endif () endif ()
set (UPM_CXX11_WORKAROUND_OPTION "-std=gnu++11") set (UPM_CXX11_WORKAROUND_OPTION "-std=gnu++11")
else () else ()
@ -191,7 +191,7 @@ if (SWIG_FOUND)
find_package(Node) find_package(Node)
endif() endif()
if(SWIG_VERSION VERSION_LESS 3.0.5 AND NODE_VERSION_STRING VERSION_GREATER 0.12) if(SWIG_VERSION VERSION_LESS 3.0.5 AND NODE_VERSION_STRING VERSION_GREATER 0.12)
message("WARNING - SWIG 3.0.5+ required for building with nodejs 0.12. Current version is ${SWIG_VERSION}") message(WARNING "WARNING - SWIG 3.0.5+ required for building with nodejs 0.12. Current version is ${SWIG_VERSION}")
endif() endif()
find_path (NODE_ROOT_DIR "include/node/node.h") find_path (NODE_ROOT_DIR "include/node/node.h")
set (NODE_INCLUDE_DIRS set (NODE_INCLUDE_DIRS
@ -257,9 +257,7 @@ function (UPM_MIXED_MODULE_INIT)
if (BUILDFTI AND UPM_MIXED_MODULE_INIT_FTI_SRC) if (BUILDFTI AND UPM_MIXED_MODULE_INIT_FTI_SRC)
#set (module_src ${UPM_MIXED_MODULE_INIT_C_SRC} ${UPM_MIXED_MODULE_INIT_FTI_SRC}) #set (module_src ${UPM_MIXED_MODULE_INIT_C_SRC} ${UPM_MIXED_MODULE_INIT_FTI_SRC})
list (APPEND module_src ${UPM_MIXED_MODULE_INIT_FTI_SRC}) list (APPEND module_src ${UPM_MIXED_MODULE_INIT_FTI_SRC})
message ( INFO " XXX BUILDING FTI ${UPM_MIXED_MODULE_INIT_FTI_SRC}")
endif (BUILDFTI AND UPM_MIXED_MODULE_INIT_FTI_SRC) endif (BUILDFTI AND UPM_MIXED_MODULE_INIT_FTI_SRC)
message ( INFO " XXX BUILDING C src ${module_src}")
# Add include directories for C # Add include directories for C
include_directories (${UPM_COMMON_HEADER_DIRS} include_directories (${UPM_COMMON_HEADER_DIRS}
@ -288,7 +286,6 @@ function (UPM_MIXED_MODULE_INIT)
# Reset the libname (upm_module_init can change it) # Reset the libname (upm_module_init can change it)
set (libname ${UPM_MIXED_MODULE_INIT_NAME}) set (libname ${UPM_MIXED_MODULE_INIT_NAME})
unset (IS_C_LIBRARY) unset (IS_C_LIBRARY)
message ( INFO " XXX BUILDING C++ src ${module_src}")
upm_module_init() upm_module_init()
# If the C++ wraps the C target, add the C target as a dependency # If the C++ wraps the C target, add the C target as a dependency
@ -368,7 +365,7 @@ if (BUILDDOC AND BUILDSWIGPYTHON AND SWIG_FOUND)
# BUILDDOC not set but still building python modules, generate an empty # BUILDDOC not set but still building python modules, generate an empty
# pyupm_doxy2swig.i file (overwriting if necessary) # pyupm_doxy2swig.i file (overwriting if necessary)
elseif (BUILDSWIGPYTHON AND SWIG_FOUND) elseif (BUILDSWIGPYTHON AND SWIG_FOUND)
message (INFO " Generating empty ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i") message (STATUS "Generating empty ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i")
file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i "// Empty doxy2swig stub") file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i "// Empty doxy2swig stub")
endif (BUILDDOC AND BUILDSWIGPYTHON AND SWIG_FOUND) endif (BUILDDOC AND BUILDSWIGPYTHON AND SWIG_FOUND)