Skip to content

Commit 276a538

Browse files
committed
fix(ninja): Set compilation to output better error description
1 parent d9a7f8c commit 276a538

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ cmake_minimum_required(VERSION 3.10)
33
# set the project name
44
PROJECT(kleinsHTTP VERSION 0.2.0)
55

6+
option (FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." FALSE)
7+
8+
if (${FORCE_COLORED_OUTPUT})
9+
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
10+
add_compile_options (-fdiagnostics-color=always)
11+
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
12+
add_compile_options (-fcolor-diagnostics)
13+
endif ()
14+
endif ()
15+
616
SET(libsrc
717
./source/sslSocket/sslSocket.cpp
818
./source/httpParser/httpParser.cpp

0 commit comments

Comments
 (0)