Skip to content

Commit a5903e2

Browse files
committed
beautify cmake log
1 parent 45e3aa0 commit a5903e2

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ set (CMAKE_CXX_STANDARD_REQUIRED true)
55

66

77
if (NOT DEFINED PACKAGE_VERSION)
8-
message ("-- WARNING: Package version is not defined, set as 0.0.0")
8+
message ("-- [CMake Project] WARNING: Package version is not defined, set as 0.0.0")
99
set (PACKAGE_VERSION "0.0.0")
1010
endif ()
1111

12-
message ("-- Package version: ${PACKAGE_VERSION}")
12+
message ("-- [CMake Project] Package version: ${PACKAGE_VERSION}")
1313

1414
project ("CMake Project"
1515
VERSION ${PACKAGE_VERSION}
@@ -26,10 +26,10 @@ if (NOT with_gtest)
2626
endif ()
2727

2828
if (WITH_GTEST)
29-
message ("-- Unit test by GoogleTest is enabled")
29+
message ("-- [CMake Project] Unit test by GoogleTest is enabled")
3030

3131
else ()
32-
message ("-- Unit test by GoogleTest is disabled")
32+
message ("-- [CMake Project] Unit test by GoogleTest is disabled")
3333

3434
endif ()
3535

config-unix.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
message ("-- Building on Linux ...")
1+
message ("-- [CMake Project] Building on Linux ...")
22

33
# configure compiler gcc with CCache
44
set (CMAKE_C_COMPILER "gcc")
55
set (CMAKE_CXX_COMPILER "g++")
66

7-
message ("-- Using C Compiler: ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_VERSION})")
8-
message ("-- Using C++ Compiler: ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
7+
message ("-- [CMake Project] Using C Compiler: ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_VERSION})")
8+
message ("-- [CMake Project] Using C++ Compiler: ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
99

1010

1111
option (BUILD_SHARED_LIBS "Build using shared libraries" ON)

config-win32.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
message ("-- Building on Win32 ...")
1+
message ("-- [CMake Project] Building on Win32 ...")
22

3-
message ("-- Using C Compiler: ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_VERSION})")
4-
message ("-- Using C++ Compiler: ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
3+
message ("-- [CMake Project] Using C Compiler: ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_VERSION})")
4+
message ("-- [CMake Project] Using C++ Compiler: ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
55

66
# using warning options W2
77
option (SUPRESS_W3_WARNINGS "Configure warning level to /W2" ON)
@@ -15,7 +15,7 @@ add_compile_options ("/Z7")
1515

1616
find_program (CCACHE_EXECUTABLE ccache)
1717
if (CCACHE_EXECUTABLE)
18-
message ("-- Ccache executable found at: ${CCACHE_EXECUTABLE}")
18+
message ("-- [CMake Project] Ccache executable found at: ${CCACHE_EXECUTABLE}")
1919
file (COPY "${CCACHE_EXECUTABLE}" DESTINATION "${PROJECT_BINARY_DIR}")
2020
file (RENAME "${PROJECT_BINARY_DIR}/ccache.exe" "${PROJECT_BINARY_DIR}/cl.exe")
2121
set (CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
@@ -28,7 +28,7 @@ if (CCACHE_EXECUTABLE)
2828
)
2929

3030
else ()
31-
message ("-- CCache not found.")
31+
message ("-- [CMake Project] CCache not found.")
3232

3333
endif ()
3434

snippet/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ endforeach()
1515

1616
# Run add_subdirectory() for each
1717
foreach (SUB_DIR ${SUB_DIRS})
18-
message ("-- Building snippet: ${SUB_DIR}")
18+
message ("-- [CMake Project] Building snippet: ${SUB_DIR}")
1919
add_subdirectory (${SUB_DIR})
2020

2121
endforeach()
2222

23-
message ("-- Done configuring snippets")
23+
message ("-- [CMake Project] Done configuring snippets")

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ add_custom_target (tests)
88
add_dependencies (tests gtest-testrun)
99

1010

11-
message ("-- Done configuring gtest")
11+
message ("-- [CMake Project] Done configuring gtest")

0 commit comments

Comments
 (0)