mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[cmake] Change COLORIZE_OUTPUT option to USE_COLORIZE_OUTPUT (#83716)
Close https://github.com/pytorch/pytorch/issues/83500 Change COLORIZE_OUTPUT option to USE_COLORIZE_OUTPUT so that it can be passed and disabled through environment variable. Not sure why COLORIZE_OUTPUT=0 didn't work before but USE_COLORIZE_OUTPUT=0 works after. Pull Request resolved: https://github.com/pytorch/pytorch/pull/83716 Approved by: https://github.com/malfet
This commit is contained in:
parent
b7afee8a27
commit
b18f984307
|
|
@ -186,7 +186,7 @@ cmake_dependent_option(
|
|||
INSTALL_TEST "Install test binaries if BUILD_TEST is on" ON
|
||||
"BUILD_TEST" OFF)
|
||||
option(USE_CPP_CODE_COVERAGE "Compile C/C++ with code coverage flags" OFF)
|
||||
option(COLORIZE_OUTPUT "Colorize output during compilation" ON)
|
||||
option(USE_COLORIZE_OUTPUT "Colorize output during compilation" ON)
|
||||
option(USE_ASAN "Use Address Sanitizer" OFF)
|
||||
option(USE_TSAN "Use Thread Sanitizer" OFF)
|
||||
option(USE_CUDA "Use CUDA" ON)
|
||||
|
|
@ -871,11 +871,11 @@ if(NOT MSVC)
|
|||
append_cxx_flag_if_supported("-Wno-constexpr-not-const" CMAKE_CXX_FLAGS)
|
||||
append_cxx_flag_if_supported("-Wno-missing-braces" CMAKE_CXX_FLAGS)
|
||||
append_cxx_flag_if_supported("-Qunused-arguments" CMAKE_CXX_FLAGS)
|
||||
if(${COLORIZE_OUTPUT})
|
||||
if(${USE_COLORIZE_OUTPUT})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${COLORIZE_OUTPUT})
|
||||
if(${USE_COLORIZE_OUTPUT})
|
||||
append_cxx_flag_if_supported("-fcolor-diagnostics" CMAKE_CXX_FLAGS)
|
||||
append_cxx_flag_if_supported("-fdiagnostics-color=always" CMAKE_CXX_FLAGS)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user