From 6da83911a081307e0999dba54706db02edb9051a Mon Sep 17 00:00:00 2001 From: janbridley Date: Fri, 25 Oct 2024 12:35:10 -0400 Subject: [PATCH 1/2] Enable cmake color output for clang/ninja --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 06aca53ad..615ce343f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,17 @@ if(WIN32) add_compile_options(/DNOMINMAX) endif() +# Enable diagnostic colors for ninja +if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always") +endif() + +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics") +endif() + include_directories( ${PROJECT_SOURCE_DIR}/cpp/util ${PROJECT_SOURCE_DIR}/cpp/locality ${PROJECT_SOURCE_DIR}/cpp/box) From 9f47d65f50f60858690965f834a3d99697cd8c63 Mon Sep 17 00:00:00 2001 From: janbridley Date: Fri, 25 Oct 2024 12:49:47 -0400 Subject: [PATCH 2/2] Add name to credits.rst --- doc/source/reference/credits.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/source/reference/credits.rst b/doc/source/reference/credits.rst index 415f88fa8..157c43740 100644 --- a/doc/source/reference/credits.rst +++ b/doc/source/reference/credits.rst @@ -403,6 +403,12 @@ Philipp Schönhöfer * Contributed code, design, documentation, and testing for ``freud.locality.FilterRAD`` class. + +Jen Bradley + +* Updated CMake to color error messages for build systems that buffer output. + + Source code -----------