-DCMAKE_INSTALL_PREFIX=/opt/accelio -DCMAKE_C_FLAGS="-O0 -g3 -gdwarf-4" \
..
-More options will be implemented in the future.
+If you often pipe `make`to `less` and would like to maintain the
+diagnostic colors for errors and warnings, you can invoke `cmake`
+with:
+
+ $ cmake -DDIAG_COLOR_ALWAYS=yes [...]
+
+Then you'll get the diagnostic colors when you execute:
+
+ $ make | less -R
+
+**More options will be implemented in the future.**
+
Targets Built
-==============
+=============
* ceph-mon
* ceph-osd
CHECK_C_COMPILER_FLAG("-fdiagnostics-color=always"
COMPILER_SUPPORTS_DIAG_COLOR_ALWAYS)
-if(COMPILER_SUPPORTS_DIAG_COLOR_ALWAYS AND DIAG_COLOR_ALWAYS)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
+if(DIAG_COLOR_ALWAYS)
+ if(COMPILER_SUPPORTS_DIAG_COLOR_ALWAYS)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
+ message(STATUS "C and C++ compilers will always show diagnostic colors")
+ else()
+ message(WARNING
+ "Unable to turn on DIAG_COLOR_ALWAYS, because this compiler does not support -fdiagnostics-color=always flag.")
+ endif()
endif()