A lot of includes notification appears in building with "NMake Makefiles" generator and VS2019 in Japanese locale
When I try to build C applications with “NMake Makefiles” generator and VS2019 in Japanese locale, a lot of includes notification appears on the command prompt screen and so I tend to miss important messages.
(This problem was firstly reported to CMake community)
Here is a reproducer:
type CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.12)
project(hello_world)
add_executable(app main.c)
type main.c:
#include <stdio.h>
int main() {
printf("Hello World");
return 0;
}
The Nmake output is:
Microsoft(R) Program Maintenance Utility Version 14.29.30136.0
Copyright (C) Microsoft Corporation. All rights reserved.
[ 50%] Building C object CMakeFiles/app.dir/main.c.obj
main.c
・<・ インクルード ファイル: C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\stdio.h
・<・ インクルード ファイル: C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vcruntime.h
・<・ インクルード ファイル: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\sal.h
・<・ インクルード ファイル: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\concurrencysal.h
・<・ インクルード ファイル: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vadefs.h
・<・ インクルード ファイル: C:\Program Files (x86)\Windows
its\10\include\10.0.19041.0\ucrt\corecrt_wstdio.h
・<・ インクルード ファイル: C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_stdio_config.h
[100%] Linking C executable app.exe
[100%] Built target app
As far as I investigated:
- The building process itself is successfully done.
- English version of VS2019 outputs no includes notification - it works fine.
- When using /showIncludes option, the Japanese message is “メモ: インクルード ファイル:”.
- I installed Visual Studio Community 16.11.4. Yesterday, I tried to update to latest one - 16.11.5. But the problem still exists.
- So, in the interface between CMake and VS2019(CL.exe in Japanese locale), something is wrong and garbage character might be induced.
- According to Marc Chevrier's advice, I checked CMAKE_CXX_CL_SHOWINCLUDES_PREFIX = “メモ: インクルード ファイル:”
- He also said that this is clearly a CMake bug in the filtering stage of compiler output.
Regards,
Tetsuya Mishima