Skip to content

[Bug] @command:cmake.compileFile calls compiler with missing include directories #4470

Open
@roelandschoukens

Description

@roelandschoukens

Brief Issue Summary

If using this command, the compilation almost always fails due to headers not found.

  • in the terminal called File Compilation, the command line is missing some include paths which are specified in the CMake file.
  • CMake Tools Diagnostics may contain requests and responses for open source files. These responses appear to contain the correct set of include paths. (there are definitely include paths in these responses that are missing in the command line)
  • compile_commands.json also contains the correct command line.

There is always a short chunk of the command line missing at offset 1024. The size of that chunk appears to be constant, independently from total command length.

The attached example reproduces this problem.

Full command line as issued by the compileFile command (for clarity, spaces have been replaced by newlines):

/usr/bin/clang++

-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-1
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-2
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-3
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-4
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-5
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-6
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-7
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-8
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-direry/include-directory-nr-12
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-13
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-14
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-15
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-16
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-17
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-18
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-19
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-20
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-21
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-22
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-23
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-24
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-25
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-26
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-27
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-28
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-29
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-30
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-31
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-32
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-33
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-34
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-35
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-36
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-37
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-38
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-39
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-40
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-41
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-42
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-43
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-44
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-45
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-46
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-47
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-48
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-49
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-50
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-51
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-52
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-53
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-54
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-55
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-56
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-57
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-58
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-59
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-60
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-61
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-62
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-63
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-64
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-65
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-66
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-67
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-68
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-69
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-70
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-71
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-72
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-73
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-74
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-75
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-76
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-77
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-78
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-79
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-80
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-81
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-82
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-83
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-84
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-85
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-86
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-87
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-88
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-89
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-90
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-91
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-92
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-93
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-94
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-95
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-96
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-97
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-98
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-99
-I/Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-100
-g
-std=c++17
-arch
arm64
-o
CMakeFiles/Test.dir/src/main.cpp.o
-c
/Users/roeland/Documents/test/cmake-long-command/src/main.cpp

CMake Tools Diagnostics

{
  "os": "darwin",
  "vscodeVersion": "1.100.2",
  "cmtVersion": "1.20.53",
  "configurations": [
    {
      "folder": "/Users/roeland/Documents/test/cmake-long-command",
      "cmakeVersion": "4.0.1",
      "configured": true,
      "generator": "Unix Makefiles",
      "usesPresets": false,
      "compilers": {
        "C": "/usr/bin/clang",
        "CXX": "/usr/bin/clang++"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug"
    ],
    "requests": [
      "file:///Users/roeland/Documents/test/cmake-long-command/src/main.cpp",
      "file:///Users/roeland/Documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-1/test-1.h"
    ],
    "responses": [
      {
        "uri": "file:///Users/roeland/Documents/test/cmake-long-command/src/main.cpp",
        "configuration": {
          "includePath": [
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-1",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-2",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-3",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-4",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-5",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-6",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-7",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-8",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-9",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-10",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-11",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-12",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-13",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-14",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-15",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-16",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-17",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-18",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-19",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-20",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-21",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-22",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-23",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-24",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-25",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-26",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-27",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-28",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-29",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-30",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-31",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-32",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-33",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-34",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-35",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-36",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-37",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-38",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-39",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-40",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-41",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-42",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-43",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-44",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-45",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-46",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-47",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-48",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-49",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-50",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-51",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-52",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-53",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-54",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-55",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-56",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-57",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-58",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-59",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-60",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-61",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-62",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-63",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-64",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-65",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-66",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-67",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-68",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-69",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-70",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-71",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-72",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-73",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-74",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-75",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-76",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-77",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-78",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-79",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-80",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-81",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-82",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-83",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-84",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-85",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-86",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-87",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-88",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-89",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-90",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-91",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-92",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-93",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-94",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-95",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-96",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-97",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-98",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-99",
            "/users/roeland/documents/test/cmake-long-command/some-long-path-to-an-include-directory/include-directory-nr-100"
          ],
          "defines": [],
          "compilerPath": "/usr/bin/clang++",
          "compilerArgs": [],
          "compilerFragments": [
            "-g -std=c++17 -arch arm64"
          ]
        }
      }
    ],
    "partialMatches": [],
    "targetCount": 1,
    "executablesCount": 1,
    "librariesCount": 0,
    "targets": [
      {
        "name": "Test",
        "type": "EXECUTABLE"
      }
    ]
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": false
    }
  ]
}

Debug Log

[main] Building folder: /Users/roeland/Documents/test/cmake-long-command/build/vscodebuild 
[main] Saving open files before configure/build
[build] Starting build
[driver] Start build all
[proc] Executing command: /opt/homebrew/bin/cmake --build /Users/roeland/Documents/test/cmake-long-command/build/vscodebuild --config Debug --target all -j 12 --
[proc]   with environment: {"COMMAND_MODE":"unix2003","EDITOR":"/usr/bin/open -n -W -a /System/Applications/TextEdit.app","ELECTRON_NO_ATTACH_CONSOLE":"1","HOME":"/Users/roeland","HOMEBREW_CELLAR":"/opt/homebrew/Cellar","HOMEBREW_PREFIX":"/opt/homebrew","HOMEBREW_REPOSITORY":"/opt/homebrew","INFOPATH":"/opt/homebrew/share/info:","LANG":"en_US.UTF-8","LC_ALL":"en_US.UTF-8","LOGNAME":"roeland","LaunchInstanceID":"6EC7ACA2-01EC-427A-82CF-F87D01AD35AA","MallocNanoZone":"0","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","PATH":"/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:~/bin:~/Library/Python/3.11/bin:/Users/roeland/.dotnet/tools","PWD":"/Users/roeland/Documents/test/cmake-long-command","SECURITYSESSIONID":"186a2","SHELL":"/bin/zsh","SHLVL":"2","SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.rYYzprqcpr/Listeners","TERM":"xterm-256color","TERM_PROGRAM":"Apple_Terminal","TERM_PROGRAM_VERSION":"455.1","TERM_SESSION_ID":"CE7E737F-802F-48E9-871A-B74F3DB21E58","TMPDIR":"/var/folders/n4/dfmgtl1d4kd_knxs3qpp3hbh0000gn/T/","USER":"roeland","VSCODE_CLI":"1","VSCODE_CODE_CACHE_PATH":"/Users/roeland/Library/Application Support/Code/CachedData/848b80aeb52026648a8ff9f7c45a9b0a80641e2e","VSCODE_CRASH_REPORTER_PROCESS_TYPE":"extensionHost","VSCODE_CWD":"/Users/roeland/Documents/test/cmake-long-command","VSCODE_ESM_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_IPC_HOOK":"/Users/roeland/Library/Application Support/Code/1.10-main.sock","VSCODE_NLS_CONFIG":"{\"userLocale\":\"en-gb\",\"osLocale\":\"en-nz\",\"resolvedLanguage\":\"en\",\"defaultMessagesFile\":\"/Applications/Visual Studio Code.app/Contents/Resources/app/out/nls.messages.json\",\"locale\":\"en-gb\",\"availableLanguages\":{}}","VSCODE_PID":"33199","XPC_FLAGS":"0x0","XPC_SERVICE_NAME":"application.com.microsoft.VSCode.18633455.18633461.630A16E7-C626-488E-B3AD-F5AAA156EF92","__CFBundleIdentifier":"com.microsoft.VSCode","__CF_USER_TEXT_ENCODING":"0x1F5:0x0:0x0","ELECTRON_RUN_AS_NODE":"1","VSCODE_L10N_BUNDLE_LOCATION":"","NINJA_STATUS":"[%s/%t %p :: %e] "}
[build] [ 50%] Building CXX object CMakeFiles/Test.dir/src/main.cpp.o
[build] [100%] Linking CXX executable Test
[build] [100%] Built target Test
[driver] Build completed: 00:00:00.166
[cmakefileapi-parser] Read reply folder: /Users/roeland/Documents/test/cmake-long-command/build/vscodebuild/.cmake/api/v1/reply
[cmakefileapi-parser] Found index files: ["cache-v2-094082456bbcbeb684f0.json","cmakeFiles-v1-911fec475635ee04139b.json","codemodel-v2-e4e2fa5e5831fec6a18d.json","directory-.-Debug-f5ebdc15457944623624.json","index-2025-05-27T23-19-20-0251.json","target-Test-Debug-b32381d508061311d544.json","toolchains-v1-d5d1f33019f757832e22.json"]
[expand] expanded ${workspaceFolder}/build/vscodebuild
[cache] Reading CMake cache file /Users/roeland/Documents/test/cmake-long-command/build/vscodebuild/CMakeCache.txt
[build] Build finished with exit code 0
[cache] Parsing CMake cache string
[extension] [5391] cmake.build finished (returned 0)

Additional Information

cmake-long-command.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    buga bug in the product

    Type

    No type

    Projects

    Status

    Blocked

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions