# A lot of includes notification appears in building with "NMake Makefiles" generator and VS2019 in Japanese locale

**URL:** https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275
**Category:** Usage
**Created:** [October 14, 2021, 12:23am UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275 "2021-10-14T00:23:14Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![tmishima](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/da6949/32.png) [@tmishima](https://discourse.cmake.org/u/tmishima)
#### Post date: [October 14, 2021, 12:23am UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275/1 "2021-10-14T00:23:14Z")

</div>

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.  
Here is a reproducer:

```auto
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 output:
C:\Users\t34ma\Documents\Work\VS2019-include-notices\hello_world\cmbuild>cmake -G "NMake Makefiles" ..
-- The C compiler identification is MSVC 19.29.30136.0
-- The CXX compiler identification is MSVC 19.29.30136.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/t34ma/Documents/Work/VS2019-include-notices/hello_world/cmbuild

C:\Users\t34ma\Documents\Work\VS2019-include-notices\hello_world\cmbuild>nmake

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 Kits\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:

1. The building process itself is successfully done.
2. English version of VS2019 outputs no includes notification - it works fine.
3. When using /showIncludes option, the Japanese message is “メモ: インクルード ファイル:”.
4. 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.  
Is this CMake problem or should I ask VS2019 people?

Regards,  
Tetsuya Mishima

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [October 14, 2021, 9:41am UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275/2 "2021-10-14T09:41:38Z")

</div>

I suspect a bad detection of the `ShowIncludes` prefix.

What is the content of variable `CMAKE_CXX_CL_SHOWINCLUDES_PREFIX`?

---

<div class="post-metadata">

### Author: ![tmishima](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/da6949/32.png) [@tmishima](https://discourse.cmake.org/u/tmishima)
#### Post date: [October 14, 2021, 10:19am UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275/3 "2021-10-14T10:19:40Z")

</div>

Hi marc.chevrier, thank you for your quick reply.

OK, I added the last line to the CMakeLists.txt:

```auto
cmake_minimum_required(VERSION 2.8.12)
project(hello_world)
add_executable(app main.c)
message(${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX})

```

Then, I got:

```auto
cmake -G "NMake Makefiles" ..
-- The C compiler identification is MSVC 19.29.30136.0
...(skipped)
-- Detecting CXX compile features
-- Detecting CXX compile features - done
メモ: インクルード ファイル:
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/t34ma/Documents/Work/VS2019-include-notices/hello_world/cmbuild

```

So, it’s properly detected:

> [@marc.chevrier](#):
>
> CMAKE\_CXX\_CL\_SHOWINCLUDES\_PREFIX = “メモ: インクルード ファイル:”

The number of includes notifications are varied every execution.  
So I guess it’s an erroneous behavior of CMake/VS2019.

Regards, Tetsuya Mishima

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [October 14, 2021, 2:07pm UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275/4 "2021-10-14T14:07:24Z")

</div>

This is clearly a `CMake` bug in the filtering stage of compiler output.

Can you create an [issue](https://gitlab.kitware.com/cmake/cmake/-/issues) for this and include your description of the problem?

Thank you.

---

<div class="post-metadata">

### Author: ![tmishima](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/da6949/32.png) [@tmishima](https://discourse.cmake.org/u/tmishima)
#### Post date: [October 14, 2021, 10:06pm UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275/5 "2021-10-14T22:06:20Z")

</div>

Thank you for your advice.  
I will create an issue and report the problem there later.  
Regards,  
Tetsuya Mishima

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [October 18, 2021, 9:34am UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275/6 "2021-10-18T09:34:44Z")

</div>

After a first inspection of `CMake` code involved in this feature, I didn’t see any obvious problem. So, I am no longer sure where the problem comes from…

@tmishima can you do some more investigation:

1. If your VS version is older than `16.8.5`, can you check with a newer release?
2. Can you do the same test with `Ninja` generator? Do you have any spurious message?
3. Do a simple test using directly `nmake` (so without evolving `CMake`) of compilation with option`/showIncludes`. Any corrupted messages?

Thank you for your help.

---

<div class="post-metadata">

### Author: ![tmishima](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/da6949/32.png) [@tmishima](https://discourse.cmake.org/u/tmishima)
#### Post date: [October 18, 2021, 10:19am UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275/7 "2021-10-18T10:19:32Z")

</div>

Hi Marc Chevrier, Thank you for you reply.

Answer to your request for further invesitigations:

1. Yes, my VS2019 is now updated to the latest - 16.11.5, but the problem still exists.
2. Sorry, I don’t use Ninja - I can not check the behavior on the Ninja-IDE.
3. Regarding "without evolving `CMake`" , I don’t see any corrupted message as follows:

```auto
cl /showIncludes main.c
Microsoft(R) C/C++ Optimizing Compiler Version 19.29.30136 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

main.c
メモ: インクルード ファイル: C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\stdio.h
メモ: インクルード ファイル: C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt.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 Kits\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
Microsoft (R) Incremental Linker Version 14.29.30136.0
Copyright (C) Microsoft Corporation. All rights reserved.

```

By the way, I have already created a issue on the cmake-gitlab as you suggested.

Regards,  
Tetsuya Mishima

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [October 18, 2021, 10:44am UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275/8 "2021-10-18T10:44:58Z")

</div>

For 2., just install executable [ninja](https://github.com/ninja-build/ninja/releases) and use `CMake` generator `Ninja`. You can install anywhere and specify variable `CMAKE_MAKE_PROGRAM` on the `CMake` command line to locate `ninja` tool:

```auto
cmake -DCMAKE_MAKE_PROGRAM=/path/to/ninja -G Ninja <src>

```

For 3., I mean using `nmake` to do the compilation. Example of simple makefile:

```auto
all: main

main: main.c
<tab>cl /showIncludes main.c

```

And run `namake`:

```auto
prompt> nmake /F makefile

```

---

<div class="post-metadata">

### Author: ![tmishima](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/da6949/32.png) [@tmishima](https://discourse.cmake.org/u/tmishima)
#### Post date: [October 18, 2021, 11:18am UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275/9 "2021-10-18T11:18:45Z")

</div>

Thanks. I tried to do it quickly.

About 2, I didn’t see any spurious message:

```auto
C:\Users\t34ma\Documents\Work\hello_world\cmbuild>cmake -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_C_COMPILER=cl.exe -DCMAKE_MAKE_PROGRAM=C:/Users/t34ma/Documents/Work/ninja.exe -G Ninja ..
-- The C compiler identification is MSVC 19.29.30136.0
-- The CXX compiler identification is MSVC 19.29.30136.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/t34ma/Documents/Work/hello_world/cmbuild

C:\Users\t34ma\Documents\Work\hello_world\cmbuild>..\..\ninja.exe
[2/2] Linking C executable app.exe

C:\Users\t34ma\Documents\Work\hello_world\cmbuild>app
Hello World

```

About 3, also no corrupted messages:

```auto
C:\Users\t34ma\Documents\Work>type Makefile
all: main

main: main.c
        cl /showIncludes main.c

C:\Users\t34ma\Documents\Work>nmake -f Makefile

Microsoft(R) Program Maintenance Utility Version 14.29.30136.0
Copyright (C) Microsoft Corporation. All rights reserved.

        cl /showIncludes main.c
Microsoft(R) C/C++ Optimizing Compiler Version 19.29.30136 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

main.c
メモ: インクルード ファイル: C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\stdio.h
メモ: インクルード ファイル: C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt.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 Kits\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
Microsoft (R) Incremental Linker Version 14.29.30136.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:main.exe
main.obj

```

Regards,  
Tetsuya Mishima

---

<div class="post-metadata">

### Author: ![klknn](https://discourse.cmake.org/user_avatar/discourse.cmake.org/klknn/32/3753_2.png) [@klknn](https://discourse.cmake.org/u/klknn)
#### Post date: [August 26, 2023, 5:18am UTC](https://discourse.cmake.org/t/a-lot-of-includes-notification-appears-in-building-with-nmake-makefiles-generator-and-vs2019-in-japanese-locale/4275/10 "2023-08-26T05:18:46Z")

</div>

I observed similar garbage messages. I could fix it by removing Japanese language pack and installing English instead. [Modify Visual Studio workloads, components, & language packs | Microsoft Learn](https://learn.microsoft.com/en-us/visualstudio/install/modify-visual-studio?view=vs-2022)  
FYI I’m using VS2022 community 14.37.32822
