mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-30 19:22:28 +00:00 
			
		
		
		
	Merge pull request #1519 from waywardmonkeys/colorize-output-with-ninja
Force color output with Ninja.
This commit is contained in:
		
						commit
						4e31794c44
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		|  | @ -409,6 +409,20 @@ list(APPEND Z3_DEPENDENT_LIBS ${CMAKE_THREAD_LIBS_INIT}) | ||||||
| ################################################################################ | ################################################################################ | ||||||
| include(${CMAKE_SOURCE_DIR}/cmake/compiler_warnings.cmake) | include(${CMAKE_SOURCE_DIR}/cmake/compiler_warnings.cmake) | ||||||
| 
 | 
 | ||||||
|  | ################################################################################ | ||||||
|  | # If using Ninja, force color output for Clang and gcc. | ||||||
|  | ################################################################################ | ||||||
|  | if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja") | ||||||
|  |   if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||||||
|  |     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics") | ||||||
|  |     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics") | ||||||
|  |   endif() | ||||||
|  |   if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||||||
|  |     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color") | ||||||
|  |     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color") | ||||||
|  |   endif() | ||||||
|  | endif() | ||||||
|  | 
 | ||||||
| ################################################################################ | ################################################################################ | ||||||
| # Option to control what type of library we build | # Option to control what type of library we build | ||||||
| ################################################################################ | ################################################################################ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue