diff --git a/Help/manual/cmake-file-api.7.rst b/Help/manual/cmake-file-api.7.rst index 3266cc9b34..a25731a102 100644 --- a/Help/manual/cmake-file-api.7.rst +++ b/Help/manual/cmake-file-api.7.rst @@ -507,6 +507,7 @@ Version 1 does not exist to avoid confusion with that from "childIndexes": [ 1 ], "projectIndex": 0, "targetIndexes": [ 0 ], + "abstractTargetIndexes": [ 1 ], "hasInstallRule": true, "minimumCMakeVersion": { "string": "3.14" @@ -519,6 +520,7 @@ Version 1 does not exist to avoid confusion with that from "parentIndex": 0, "projectIndex": 0, "targetIndexes": [ 1 ], + "abstractTargetIndexes": [ 0 ], "minimumCMakeVersion": { "string": "3.14" }, @@ -529,7 +531,8 @@ Version 1 does not exist to avoid confusion with that from { "name": "MyProject", "directoryIndexes": [ 0, 1 ], - "targetIndexes": [ 0, 1 ] + "targetIndexes": [ 0, 1 ], + "abstractTargetIndexes": [ 0, 1 ], } ], "targets": [ @@ -546,6 +549,20 @@ Version 1 does not exist to avoid confusion with that from "jsonFile": "" } ] + "abstractTargets": [ + { + "name": "MyImportedExecutable", + "directoryIndex": 1, + "projectIndex": 0, + "jsonFile": "" + }, + { + "name": "MyPureInterfaceLibrary", + "directoryIndex": 0, + "projectIndex": 0, + "jsonFile": "" + } + ] } ] } @@ -612,10 +629,20 @@ The members specific to ``codemodel`` objects are: indicating the build system project to which the this directory belongs. ``targetIndexes`` - Optional member that is present when the directory itself has targets, - excluding those belonging to subdirectories. The value is a JSON - array of entries corresponding to the targets. Each entry is an - unsigned integer 0-based index into the main ``targets`` array. + Optional member that is present when the directory itself has + build system targets, excluding those belonging to subdirectories. + The value is a JSON array of entries corresponding to the build system + targets. Each entry is an unsigned integer 0-based index into the main + ``targets`` array. + + ``abstractTargetIndexes`` + Optional member that is present when the directory itself has abstract + targets, excluding those belonging to subdirectories. + The value is a JSON array of entries corresponding to the abstract + targets. Each entry is an unsigned integer 0-based index into the main + ``abstractTargets`` array. + + This field was added in codemodel version 2.9. ``minimumCMakeVersion`` Optional member present when a minimum required version of CMake is @@ -677,17 +704,27 @@ The members specific to ``codemodel`` objects are: integer 0-based index into the main ``directories`` array. ``targetIndexes`` - Optional member that is present when the project itself has targets, - excluding those belonging to sub-projects. The value is a JSON - array of entries corresponding to the targets. Each entry is an - unsigned integer 0-based index into the main ``targets`` array. + Optional member that is present when the project itself has + build system targets, excluding those belonging to sub-projects. + The value is a JSON array of entries corresponding to the build system + targets. Each entry is an unsigned integer 0-based index into the main + ``targets`` array. + + ``abstractTargetIndexes`` + Optional member that is present when the project itself has + abstract targets, excluding those belonging to sub-projects. + The value is a JSON array of entries corresponding to the abstract + targets. Each entry is an unsigned integer 0-based index into the main + ``abstractTargets`` array. + + This field was added in codemodel version 2.9. ``targets`` A JSON array of entries corresponding to the build system targets. Such targets are created by calls to :command:`add_executable`, :command:`add_library`, and :command:`add_custom_target`, excluding - imported targets and interface libraries (which do not generate any - build rules). Each entry is a JSON object containing members: + imported targets and interface libraries that do not generate any + build rules. Each entry is a JSON object containing members: ``name`` A string specifying the target name. @@ -709,6 +746,39 @@ The members specific to ``codemodel`` objects are: to another JSON file containing a `"codemodel" version 2 "target" object`_. + ``abstractTargets`` + A JSON array of entries corresponding to targets that are not present + in the build system. These are imported targets or interface libraries + created by calls to :command:`add_executable` or :command:`add_library`. + In the case of interface libraries, only those that are not part of the + build system are included in this array. Interface libraries that do + participate in the build system will be included in the ``targets`` + array instead. + + Each entry is a JSON object containing members: + + ``name`` + A string specifying the target name. + + ``id`` + A string uniquely identifying the target. This matches the ``id`` + field in the file referenced by ``jsonFile``. + + ``directoryIndex`` + An unsigned integer 0-based index into the main ``directories`` array + indicating the build system directory in which the target is defined. + + ``projectIndex`` + An unsigned integer 0-based index into the main ``projects`` array + indicating the build system project in which the target is defined. + + ``jsonFile`` + A JSON string specifying a path relative to the codemodel file + to another JSON file containing a + `"codemodel" version 2 "target" object`_. + + This field was added in codemodel version 2.9. + "codemodel" version 2 "directory" object ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1039,6 +1109,31 @@ with members: ``MODULE_LIBRARY``, ``OBJECT_LIBRARY``, ``INTERFACE_LIBRARY``, or ``UTILITY``. +``imported`` + Optional member that is present with boolean value ``true`` if the + target is an imported target. + + This field was added in codemodel version 2.9. + +``local`` + Optional member that is present with boolean value ``true`` if the + target is only defined with local scope rather than being a global target. + Currently, only imported targets will potentially have this field. + + This field was added in codemodel version 2.9. + +``abstract`` + Optional member that is present with boolean value ``true`` if the + target is an abstract target. Abstract targets are not part of the build + system, they only exist to describe dependencies or to provide usage + requirements to targets that link to them. Examples include imported targets + and interface libraries that have no generated sources. Abstract targets + cannot be built, so they should not be presented to the user as a buildable + target. + + This field was added in codemodel version 2.9. Abstract targets were not + included anywhere in file API replies in codemodel version 2.8 and earlier. + ``backtrace`` Optional member that is present when a CMake language backtrace to the command in the source code that created the target is available. @@ -1146,8 +1241,8 @@ with members: This field was added in codemodel version 2.7. ``link`` - Optional member that is present for executables and shared library - targets that link into a runtime binary. The value is a JSON object + Optional member that is present for non-imported executables and shared + library targets that link into a runtime binary. The value is a JSON object with members describing the link step: ``language`` @@ -1193,8 +1288,8 @@ with members: with forward slashes. ``archive`` - Optional member that is present for static library targets. The value - is a JSON object with members describing the archive step: + Optional member that is present for non-imported static library targets. + The value is a JSON object with members describing the archive step: ``commandFragments`` Optional member that is present when fragments of the archiver command @@ -1233,6 +1328,8 @@ with members: ``dependencies`` Optional member that is present when the target depends on other targets. + It is not present if the target is not part of the build system (i.e. it is + not an imported target or an interface library with no generated sources). The value is a JSON array of entries corresponding to the dependencies. Each entry is a JSON object with members: diff --git a/Help/manual/file_api/schema_codemodel.json b/Help/manual/file_api/schema_codemodel.json index 4a5045e63b..72902cbbdc 100644 --- a/Help/manual/file_api/schema_codemodel.json +++ b/Help/manual/file_api/schema_codemodel.json @@ -14,6 +14,9 @@ }, { "$ref": "#/definitions/codemodelV2_3" + }, + { + "$ref": "#/definitions/codemodelV2_9" } ], "definitions": { @@ -54,7 +57,26 @@ }, "minor": { "type": "integer", - "minimum": 3 + "minimum": 3, + "maximum": 8 + } + }, + "additionalProperties": false + }, + "versionV2_9": { + "type": "object", + "required": [ + "major", + "minor" + ], + "properties": { + "major": { + "type": "integer", + "const": 2 + }, + "minor": { + "type": "integer", + "minimum": 9 } }, "additionalProperties": false @@ -103,7 +125,7 @@ "minimum": 0, "description": "Index into the projects array" }, - "configurationDirectoryItemTargetIndexes": { + "configurationDirectoryItemBuildSystemTargetIndexes": { "type": "array", "items": { "type": "integer", @@ -111,6 +133,14 @@ }, "description": "Indices into the targets array" }, + "configurationDirectoryItemAbstractTargetIndexesV2_9": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "description": "Indices into the abstractTargets array" + }, "configurationDirectoryItemMinimumCMakeVersion": { "type": "object", "required": [ @@ -160,7 +190,7 @@ "$ref": "#/definitions/configurationDirectoryItemProjectIndex" }, "targetIndexes": { - "$ref": "#/definitions/configurationDirectoryItemTargetIndexes" + "$ref": "#/definitions/configurationDirectoryItemBuildSystemTargetIndexes" }, "minimumCMakeVersion": { "$ref": "#/definitions/configurationDirectoryItemMinimumCMakeVersion" @@ -198,7 +228,51 @@ "$ref": "#/definitions/configurationDirectoryItemProjectIndex" }, "targetIndexes": { - "$ref": "#/definitions/configurationDirectoryItemTargetIndexes" + "$ref": "#/definitions/configurationDirectoryItemBuildSystemTargetIndexes" + }, + "minimumCMakeVersion": { + "$ref": "#/definitions/configurationDirectoryItemMinimumCMakeVersion" + }, + "hasInstallRule": { + "$ref": "#/definitions/configurationDirectoryItemHasInstallRule" + }, + "jsonFile": { + "$ref": "#/definitions/configurationDirectoryItemJsonFileV2_3" + } + }, + "additionalProperties": false + } + }, + "configurationDirectoriesV2_9": { + "type": "array", + "items": { + "type": "object", + "required": [ + "source", + "build", + "projectIndex" + ], + "properties": { + "source": { + "$ref": "#/definitions/configurationDirectoryItemSource" + }, + "build": { + "$ref": "#/definitions/configurationDirectoryItemBuild" + }, + "parentIndex": { + "$ref": "#/definitions/configurationDirectoryItemParentIndex" + }, + "childIndexes": { + "$ref": "#/definitions/configurationDirectoryItemChildIndexes" + }, + "projectIndex": { + "$ref": "#/definitions/configurationDirectoryItemProjectIndex" + }, + "targetIndexes": { + "$ref": "#/definitions/configurationDirectoryItemBuildSystemTargetIndexes" + }, + "abstractTargetIndexes": { + "$ref": "#/definitions/configurationDirectoryItemAbstractTargetIndexesV2_9" }, "minimumCMakeVersion": { "$ref": "#/definitions/configurationDirectoryItemMinimumCMakeVersion" @@ -262,6 +336,59 @@ } } }, + "configurationProjectsV2_9": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "directoryIndexes" + ], + "properties": { + "name": { + "type": "string", + "description": "Project name" + }, + "parentIndex": { + "type": "integer", + "minimum": 0, + "description": "Index of parent project" + }, + "childIndexes": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "description": "Indices of child projects" + }, + "directoryIndexes": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "description": "Indices into directories array" + }, + "targetIndexes": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "description": "Indices into targets array" + }, + "abstractTargetIndexes": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "description": "Indices into abstractTargets array" + } + } + } + }, "configurationTargets": { "type": "array", "items": { @@ -352,6 +479,37 @@ "additionalProperties": false } }, + "configurationsV2_9": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "directories", + "projects", + "targets", + "abstractTargets" + ], + "properties": { + "name": { + "$ref": "#/definitions/configurationName" + }, + "projects": { + "$ref": "#/definitions/configurationProjectsV2_9" + }, + "targets": { + "$ref": "#/definitions/configurationTargets" + }, + "abstractTargets": { + "$ref": "#/definitions/configurationTargets" + }, + "directories": { + "$ref": "#/definitions/configurationDirectoriesV2_9" + } + }, + "additionalProperties": false + } + }, "codemodelV2_0": { "properties": { "kind": { @@ -385,6 +543,23 @@ } }, "additionalProperties": false + }, + "codemodelV2_9": { + "properties": { + "kind": { + "$ref": "#/definitions/kind" + }, + "version": { + "$ref": "#/definitions/versionV2_9" + }, + "paths": { + "$ref": "#/definitions/paths" + }, + "configurations": { + "$ref": "#/definitions/configurationsV2_9" + } + }, + "additionalProperties": false } } } diff --git a/Help/manual/file_api/schema_target.json b/Help/manual/file_api/schema_target.json index 0f3cff5234..f73fc41afd 100644 --- a/Help/manual/file_api/schema_target.json +++ b/Help/manual/file_api/schema_target.json @@ -60,7 +60,7 @@ "type": "string", "description": "Unique identifier for the target. The format is unspecified and should not be interpreted by clients." }, - "type": { + "typeV2_0": { "type": "string", "enum": [ "EXECUTABLE", @@ -72,6 +72,31 @@ "UTILITY" ] }, + "typeV2_9": { + "type": "string", + "enum": [ + "EXECUTABLE", + "STATIC_LIBRARY", + "SHARED_LIBRARY", + "MODULE_LIBRARY", + "OBJECT_LIBRARY", + "INTERFACE_LIBRARY", + "UNKNOWN_LIBRARY", + "UTILITY" + ] + }, + "importedV2_9": { + "type": "boolean", + "description": "True if the target is imported" + }, + "localV2_9": { + "type": "boolean", + "description": "True if the target is defined in a local scope rather than being a global target" + }, + "abstractV2_9": { + "type": "boolean", + "description": "True if the target is not part of the build system" + }, "backtrace": { "type": "integer", "minimum": 0, @@ -865,7 +890,7 @@ "$ref": "#/definitions/id" }, "type": { - "$ref": "#/definitions/type" + "$ref": "#/definitions/typeV2_0" }, "backtrace": { "$ref": "#/definitions/backtrace" @@ -929,7 +954,7 @@ "$ref": "#/definitions/id" }, "type": { - "$ref": "#/definitions/type" + "$ref": "#/definitions/typeV2_0" }, "backtrace": { "$ref": "#/definitions/backtrace" @@ -993,7 +1018,7 @@ "$ref": "#/definitions/id" }, "type": { - "$ref": "#/definitions/type" + "$ref": "#/definitions/typeV2_0" }, "backtrace": { "$ref": "#/definitions/backtrace" @@ -1057,7 +1082,7 @@ "$ref": "#/definitions/id" }, "type": { - "$ref": "#/definitions/type" + "$ref": "#/definitions/typeV2_0" }, "backtrace": { "$ref": "#/definitions/backtrace" @@ -1124,7 +1149,7 @@ "$ref": "#/definitions/id" }, "type": { - "$ref": "#/definitions/type" + "$ref": "#/definitions/typeV2_0" }, "backtrace": { "$ref": "#/definitions/backtrace" @@ -1191,7 +1216,7 @@ "$ref": "#/definitions/id" }, "type": { - "$ref": "#/definitions/type" + "$ref": "#/definitions/typeV2_0" }, "backtrace": { "$ref": "#/definitions/backtrace" @@ -1261,7 +1286,7 @@ "$ref": "#/definitions/id" }, "type": { - "$ref": "#/definitions/type" + "$ref": "#/definitions/typeV2_0" }, "backtrace": { "$ref": "#/definitions/backtrace" @@ -1338,7 +1363,16 @@ "$ref": "#/definitions/id" }, "type": { - "$ref": "#/definitions/type" + "$ref": "#/definitions/typeV2_9" + }, + "imported": { + "$ref": "#/definitions/importedV2_9" + }, + "local": { + "$ref": "#/definitions/localV2_9" + }, + "abstract": { + "$ref": "#/definitions/abstractV2_9" }, "backtrace": { "$ref": "#/definitions/backtrace" diff --git a/Help/release/dev/fileapi-direct-dependencies.rst b/Help/release/dev/fileapi-direct-dependencies.rst new file mode 100644 index 0000000000..0c49599670 --- /dev/null +++ b/Help/release/dev/fileapi-direct-dependencies.rst @@ -0,0 +1,17 @@ +fileapi-direct-dependencies +--------------------------- + +* The :manual:`cmake-file-api(7)` "codemodel" version 2 now includes imported + targets and all interface library targets in its replies. Previously, + imported targets were omitted, and only those interface targets that + participated in the build system were included. The following changes + support these new additions: + + * The "target" object gained ``imported``, ``local``, and ``abstract`` fields. + * The "target" object's ``type`` field can now also hold the value + ``UNKNOWN_LIBRARY``. + * The "codemodel" object's ``configurations`` entries gained a new + ``abstractTargets`` array. + * Entries in the ``directories`` and ``projects`` arrays of the "codemodel" + object's ``configurations`` entries gained a new ``abstractTargetIndexes`` + array. diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx index 9e74ca062d..9553fa3dd5 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -250,7 +250,8 @@ class CodemodelConfig { cmStateSnapshot Snapshot; cmLocalGenerator const* LocalGenerator = nullptr; - Json::Value TargetIndexes = Json::arrayValue; + Json::Value BuildSystemTargetIndexes = Json::arrayValue; + Json::Value AbstractTargetIndexes = Json::arrayValue; Json::ArrayIndex ProjectIndex; bool HasInstallRule = false; }; @@ -266,7 +267,8 @@ class CodemodelConfig Json::ArrayIndex ParentIndex = NoParentIndex; Json::Value ChildIndexes = Json::arrayValue; Json::Value DirectoryIndexes = Json::arrayValue; - Json::Value TargetIndexes = Json::arrayValue; + Json::Value BuildSystemTargetIndexes = Json::arrayValue; + Json::Value AbstractTargetIndexes = Json::arrayValue; }; std::map ProjectMap; @@ -274,6 +276,12 @@ class CodemodelConfig TargetIndexMapType TargetIndexMap; + struct DumpedTargets + { + Json::Value BuildSystemTargets = Json::arrayValue; + Json::Value AbstractTargets = Json::arrayValue; + }; + void ProcessDirectories(); Json::ArrayIndex GetDirectoryIndex(cmLocalGenerator const* lg); @@ -281,7 +289,7 @@ class CodemodelConfig Json::ArrayIndex AddProject(cmStateSnapshot s); - Json::Value DumpTargets(); + DumpedTargets DumpTargets(); Json::Value DumpTarget(cmGeneratorTarget* gt, Json::ArrayIndex ti); Json::Value DumpDirectories(); @@ -591,9 +599,14 @@ Json::Value CodemodelConfig::Dump() Json::Value configuration = Json::objectValue; configuration["name"] = this->Config; this->ProcessDirectories(); - configuration["targets"] = this->DumpTargets(); + + DumpedTargets dumpedTargets = this->DumpTargets(); + configuration["targets"] = dumpedTargets.BuildSystemTargets; + configuration["abstractTargets"] = dumpedTargets.AbstractTargets; + configuration["directories"] = this->DumpDirectories(); configuration["projects"] = this->DumpProjects(); + return configuration; } @@ -680,15 +693,16 @@ Json::ArrayIndex CodemodelConfig::AddProject(cmStateSnapshot s) return projectIndex; } -Json::Value CodemodelConfig::DumpTargets() +CodemodelConfig::DumpedTargets CodemodelConfig::DumpTargets() { - Json::Value targets = Json::arrayValue; + DumpedTargets dumpedTargets; std::vector targetList; cmGlobalGenerator* gg = this->FileAPI.GetCMakeInstance()->GetGlobalGenerator(); for (auto const& lg : gg->GetLocalGenerators()) { cm::append(targetList, lg->GetGeneratorTargets()); + cm::append(targetList, lg->GetOwnedImportedGeneratorTargets()); } std::sort(targetList.begin(), targetList.end(), [](cmGeneratorTarget* l, cmGeneratorTarget* r) { @@ -696,8 +710,7 @@ Json::Value CodemodelConfig::DumpTargets() }); for (cmGeneratorTarget* gt : targetList) { - if (gt->GetType() == cmStateEnums::GLOBAL_TARGET || - !gt->IsInBuildSystem()) { + if (gt->GetType() == cmStateEnums::GLOBAL_TARGET) { continue; } @@ -706,17 +719,22 @@ Json::Value CodemodelConfig::DumpTargets() continue; } + Json::Value& targets = gt->IsInBuildSystem() + ? dumpedTargets.BuildSystemTargets + : dumpedTargets.AbstractTargets; targets.append(this->DumpTarget(gt, targets.size())); } - return targets; + return dumpedTargets; } Json::Value CodemodelConfig::DumpTarget(cmGeneratorTarget* gt, Json::ArrayIndex ti) { Target t(gt, this->VersionMajor, this->VersionMinor, this->Config); - std::string prefix = "target-" + gt->GetName(); + std::string safeTargetName = gt->GetName(); + std::replace(safeTargetName.begin(), safeTargetName.end(), ':', '_'); + std::string prefix = "target-" + safeTargetName; if (!this->Config.empty()) { prefix += "-" + this->Config; } @@ -727,12 +745,20 @@ Json::Value CodemodelConfig::DumpTarget(cmGeneratorTarget* gt, // Cross-reference directory containing target. Json::ArrayIndex di = this->GetDirectoryIndex(gt->GetLocalGenerator()); target["directoryIndex"] = di; - this->Directories[di].TargetIndexes.append(ti); + if (gt->IsInBuildSystem()) { + this->Directories[di].BuildSystemTargetIndexes.append(ti); + } else { + this->Directories[di].AbstractTargetIndexes.append(ti); + } // Cross-reference project containing target. Json::ArrayIndex pi = this->Directories[di].ProjectIndex; target["projectIndex"] = pi; - this->Projects[pi].TargetIndexes.append(ti); + if (gt->IsInBuildSystem()) { + this->Projects[pi].BuildSystemTargetIndexes.append(ti); + } else { + this->Projects[pi].AbstractTargetIndexes.append(ti); + } this->TargetIndexMap[gt] = ti; @@ -774,8 +800,11 @@ Json::Value CodemodelConfig::DumpDirectory(Directory& d) directory["projectIndex"] = d.ProjectIndex; - if (!d.TargetIndexes.empty()) { - directory["targetIndexes"] = std::move(d.TargetIndexes); + if (!d.BuildSystemTargetIndexes.empty()) { + directory["targetIndexes"] = std::move(d.BuildSystemTargetIndexes); + } + if (!d.AbstractTargetIndexes.empty()) { + directory["abstractTargetIndexes"] = std::move(d.AbstractTargetIndexes); } Json::Value minimumCMakeVersion = this->DumpMinimumCMakeVersion(d.Snapshot); @@ -841,8 +870,11 @@ Json::Value CodemodelConfig::DumpProject(Project& p) project["directoryIndexes"] = std::move(p.DirectoryIndexes); - if (!p.TargetIndexes.empty()) { - project["targetIndexes"] = std::move(p.TargetIndexes); + if (!p.BuildSystemTargetIndexes.empty()) { + project["targetIndexes"] = std::move(p.BuildSystemTargetIndexes); + } + if (!p.AbstractTargetIndexes.empty()) { + project["abstractTargetIndexes"] = std::move(p.AbstractTargetIndexes); } return project; @@ -1231,6 +1263,15 @@ Json::Value Target::Dump() target["name"] = this->GT->GetName(); target["type"] = cmState::GetTargetTypeName(type); target["id"] = TargetId(this->GT, this->TopBuild); + if (this->GT->IsImported()) { + target["imported"] = true; + if (!this->GT->IsImportedGloballyVisible()) { + target["local"] = true; + } + } + if (!this->GT->IsInBuildSystem()) { + target["abstract"] = true; + } target["paths"] = this->DumpPaths(); if (this->GT->Target->GetIsGeneratorProvided()) { target["isGeneratorProvided"] = true; @@ -1253,10 +1294,14 @@ Json::Value Target::Dump() type == cmStateEnums::SHARED_LIBRARY || type == cmStateEnums::MODULE_LIBRARY) { target["nameOnDisk"] = this->GT->GetFullName(this->Config); - target["link"] = this->DumpLink(); + if (!this->GT->IsImported()) { + target["link"] = this->DumpLink(); + } } else if (type == cmStateEnums::STATIC_LIBRARY) { target["nameOnDisk"] = this->GT->GetFullName(this->Config); - target["archive"] = this->DumpArchive(); + if (!this->GT->IsImported()) { + target["archive"] = this->DumpArchive(); + } } if (type == cmStateEnums::EXECUTABLE) { @@ -1266,13 +1311,17 @@ Json::Value Target::Dump() } } - Json::Value dependencies = this->DumpDependencies(); - if (!dependencies.empty()) { - target["dependencies"] = dependencies; + if (!this->GT->IsImported()) { + Json::Value dependencies = this->DumpDependencies(); + if (!dependencies.empty()) { + target["dependencies"] = dependencies; + } } { - this->ProcessLanguages(); + if (!this->GT->IsImported()) { + this->ProcessLanguages(); + } auto fileSetInfo = this->DumpFileSets(); @@ -1280,6 +1329,8 @@ Json::Value Target::Dump() target["fileSets"] = fileSetInfo.first; } + // Even though some types of targets can't have sources, we have to always + // output a sources array to preserve backward compatibility target["sources"] = this->DumpSources(fileSetInfo.second); Json::Value folder = this->DumpFolder(); @@ -1287,22 +1338,26 @@ Json::Value Target::Dump() target["folder"] = std::move(folder); } - Json::Value sourceGroups = this->DumpSourceGroups(); - if (!sourceGroups.empty()) { - target["sourceGroups"] = std::move(sourceGroups); - } + if (!this->GT->IsImported()) { + Json::Value sourceGroups = this->DumpSourceGroups(); + if (!sourceGroups.empty()) { + target["sourceGroups"] = std::move(sourceGroups); + } - Json::Value compileGroups = this->DumpCompileGroups(); - if (!compileGroups.empty()) { - target["compileGroups"] = std::move(compileGroups); + Json::Value compileGroups = this->DumpCompileGroups(); + if (!compileGroups.empty()) { + target["compileGroups"] = std::move(compileGroups); + } } } target["backtraceGraph"] = this->Backtraces.Dump(); - Json::Value debugger = this->DumpDebugger(); - if (!debugger.isNull()) { - target["debugger"] = std::move(debugger); + if (!this->GT->IsImported()) { + Json::Value debugger = this->DumpDebugger(); + if (!debugger.isNull()) { + target["debugger"] = std::move(debugger); + } } return target; diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py index 8c90273670..974cc726dc 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py +++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py @@ -82,6 +82,13 @@ def check_directory(c, major, minor): missing_exception=lambda e: "Target ID: %s" % e, extra_exception=lambda a: "Target ID: %s" % c["targets"][a]["id"]) + if expected["abstractTargetIds"] is not None: + expected_keys.append("abstractTargetIndexes") + check_list_match(lambda a, e: matches(c["abstractTargets"][a]["id"], e), + actual["abstractTargetIndexes"], expected["abstractTargetIds"], + missing_exception=lambda e: "Abstract target ID: %s" % e, + extra_exception=lambda a: "Abstract target ID: %s" % c["abstractTargets"][a]["id"]) + if expected["minimumCMakeVersion"] is not None: expected_keys.append("minimumCMakeVersion") assert is_dict(actual["minimumCMakeVersion"]) @@ -295,6 +302,18 @@ def check_target(c, major, minor): assert is_string(obj["type"], expected["type"]) check_backtrace_graph(obj["backtraceGraph"]) + if expected["imported"] is not None: + expected_keys.append("imported") + assert is_bool(obj["imported"], expected["imported"]) + + if expected["local"] is not None: + expected_keys.append("local") + assert is_bool(obj["local"], expected["local"]) + + if expected["abstract"] is not None: + expected_keys.append("abstract") + assert is_bool(obj["abstract"], expected["abstract"]) + assert is_dict(obj["paths"]) assert sorted(obj["paths"].keys()) == ["build", "source"] assert matches(obj["paths"]["build"], expected["build"]) @@ -747,6 +766,13 @@ def check_project(c): missing_exception=lambda e: "Target ID: %s" % e, extra_exception=lambda a: "Target ID: %s" % c["targets"][a]["id"]) + if expected["abstractTargetIds"] is not None: + expected_keys.append("abstractTargetIndexes") + check_list_match(lambda a, e: matches(c["abstractTargets"][a]["id"], e), + actual["abstractTargetIndexes"], expected["abstractTargetIds"], + missing_exception=lambda e: "Abstract target ID: %s" % e, + extra_exception=lambda a: "Abstract target ID: %s" % c["abstractTargets"][a]["id"]) + assert sorted(actual.keys()) == sorted(expected_keys) return _check @@ -779,6 +805,7 @@ def gen_check_directories(c, g): if ';' in os.environ.get("CMAKE_OSX_ARCHITECTURES", ""): for e in expected: e["targetIds"] = filter_list(lambda t: not matches(t, "^\\^(link_imported_object_exe)"), e["targetIds"]) + e["abstractTargetIds"] = filter_list(lambda t: not matches(t, "^\\^(imported_object_lib)"), e["abstractTargetIds"]) else: for e in expected: @@ -815,7 +842,7 @@ def check_directories(c, g, major, minor): missing_exception=lambda e: "Directory source: %s" % e["source"], extra_exception=lambda a: "Directory source: %s" % a["source"]) -def gen_check_targets(c, g, inSource): +def gen_check_build_system_targets(c, g, inSource): expected = [ read_codemodel_json_data("targets/all_build_top.json"), read_codemodel_json_data("targets/zero_check_top.json"), @@ -1015,14 +1042,55 @@ def gen_check_targets(c, g, inSource): return expected -def check_targets(c, g, major, minor, inSource): +def gen_check_abstract_targets(c, g, inSource): + expected = [ + read_codemodel_json_data("targets/interface_lib.json"), + + read_codemodel_json_data("targets/import_framework.json"), + + read_codemodel_json_data("targets/imported_exe.json"), + read_codemodel_json_data("targets/imported_lib.json"), + read_codemodel_json_data("targets/imported_interface_lib.json"), + read_codemodel_json_data("targets/imported_object_lib.json"), + read_codemodel_json_data("targets/imported_shared_lib.json"), + read_codemodel_json_data("targets/imported_static_lib.json"), + + read_codemodel_json_data("targets/iface_none.json"), + ] + + if sys.platform == "darwin": + for e in expected: + if e["name"] == "import_framework": + apple_import_framework = read_codemodel_json_data("targets/apple_import_framework.json") + e["artifacts"] = apple_import_framework["artifacts"] + e["nameOnDisk"] = apple_import_framework["nameOnDisk"] + + if g["name"] == "Xcode": + if ';' in os.environ.get("CMAKE_OSX_ARCHITECTURES", ""): + expected = filter_list(lambda e: e["name"] not in ("imported_object_lib"), expected) + + if sys.platform not in ("win32", "cygwin", "msys"): + for e in expected: + e["artifacts"] = filter_list(lambda a: not a["_dllExtra"], e["artifacts"]) + + return expected + +def check_build_system_targets(c, g, major, minor, inSource): check_list_match(lambda a, e: matches(a["id"], e["id"]), - c["targets"], gen_check_targets(c, g, inSource), + c["targets"], gen_check_build_system_targets(c, g, inSource), check=check_target(c, major, minor), check_exception=lambda a, e: "Target ID: %s" % a["id"], missing_exception=lambda e: "Target ID: %s" % e["id"], extra_exception=lambda a: "Target ID: %s" % a["id"]) +def check_abstract_targets(c, g, major, minor, inSource): + check_list_match(lambda a, e: matches(a["id"], e["id"]), + c["abstractTargets"], gen_check_abstract_targets(c, g, inSource), + check=check_target(c, major, minor), + check_exception=lambda a, e: "Abstract target ID: %s" % a["id"], + missing_exception=lambda e: "Abstract target ID: %s" % e["id"], + extra_exception=lambda a: "Abstract target ID: %s" % a["id"]) + def gen_check_projects(c, g): expected = [ read_codemodel_json_data("projects/codemodel-v2.json"), @@ -1045,6 +1113,7 @@ def gen_check_projects(c, g): if ';' in os.environ.get("CMAKE_OSX_ARCHITECTURES", ""): for e in expected: e["targetIds"] = filter_list(lambda t: not matches(t, "^\\^(link_imported_object_exe)"), e["targetIds"]) + e["abstractTargetIds"] = filter_list(lambda t: not matches(t, "^\\^(imported_object_lib)"), e["abstractTargetIds"]) else: for e in expected: @@ -1060,10 +1129,11 @@ def check_projects(c, g): extra_exception=lambda a: "Project name: %s" % a["name"]) def check_object_codemodel_configuration(c, g, major, minor, inSource): - assert sorted(c.keys()) == ["directories", "name", "projects", "targets"] + assert sorted(c.keys()) == ["abstractTargets", "directories", "name", "projects", "targets"] assert is_string(c["name"]) check_directories(c, g, major, minor) - check_targets(c, g, major, minor, inSource) + check_build_system_targets(c, g, major, minor, inSource) + check_abstract_targets(c, g, major, minor, inSource) check_projects(c, g) def check_object_codemodel(g, major, minor): diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json index de8b1779e7..d804315358 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json @@ -9,6 +9,7 @@ "^c_alias_exe::@53632cba2752272bb008$", "^cxx_alias_exe::@53632cba2752272bb008$" ], + "abstractTargetIds": null, "projectName": "Alias", "minimumCMakeVersion": "3.13", "hasInstallRule": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json index e57191cb43..dd61d78a8c 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json @@ -9,6 +9,7 @@ "^custom_exe::@c11385ffed57b860da63$", "^custom_tgt::@c11385ffed57b860da63$" ], + "abstractTargetIds": null, "projectName": "Custom", "minimumCMakeVersion": "3.13", "hasInstallRule": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.cross.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.cross.json index 8f6ded58be..a1672e4c56 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.cross.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.cross.json @@ -9,6 +9,7 @@ "^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$", "^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$" ], + "abstractTargetIds": null, "projectName": "Cxx", "minimumCMakeVersion": "3.13", "hasInstallRule": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json index 0bc24877dd..28ec0814b8 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json @@ -18,6 +18,7 @@ "^cxx_static_exe::@a56b12a3f5c0529fb296$", "^cxx_static_lib::@a56b12a3f5c0529fb296$" ], + "abstractTargetIds": null, "projectName": "Cxx", "minimumCMakeVersion": "3.13", "hasInstallRule": true, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json index dfa1e8ba7f..5052f7bf6f 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json @@ -7,6 +7,7 @@ "^dir/very-long$" ], "targetIds": null, + "abstractTargetIds": null, "projectName": "codemodel-v2", "minimumCMakeVersion": "3.13", "hasInstallRule": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json index 12677f27f5..b7813a00ee 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json @@ -4,6 +4,7 @@ "parentSource": "^dir$", "childSources": null, "targetIds": null, + "abstractTargetIds": null, "projectName": "codemodel-v2", "minimumCMakeVersion": "3.13", "hasInstallRule": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_very-long.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_very-long.json index 117f356151..7940049f03 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_very-long.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_very-long.json @@ -4,6 +4,7 @@ "parentSource": "^dir$", "childSources": null, "targetIds": null, + "abstractTargetIds": null, "projectName": "codemodel-v2", "minimumCMakeVersion": "3.13", "hasInstallRule": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json index f1199c36b5..e3422a5254 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json @@ -8,6 +8,7 @@ "^ZERO_CHECK::@[0-9a-f]+$", "^generated_exe::@[0-9a-f]+$" ], + "abstractTargetIds": null, "projectName": "External", "minimumCMakeVersion": "3.13", "hasInstallRule": true, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/fileset.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/fileset.json index 1cd9706183..ea7a0791b9 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/fileset.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/fileset.json @@ -7,6 +7,7 @@ "^c_headers_1::@6b8db101d64c125f29fe$", "^c_headers_2::@6b8db101d64c125f29fe$" ], + "abstractTargetIds": null, "projectName": "codemodel-v2", "minimumCMakeVersion": "3.13", "hasInstallRule": true, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/framework.json index 3affc02cc2..1e344fd5be 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/framework.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/framework.json @@ -10,6 +10,9 @@ "^static_framework::@217a96c3a62328a73ef4$", "^exe_framework::@217a96c3a62328a73ef4$" ], + "abstractTargetIds": [ + "^import_framework::@217a96c3a62328a73ef4$" + ], "projectName": "Framework", "minimumCMakeVersion": "3.13", "hasInstallRule": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json index 8210d7feff..450a3e6b68 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json @@ -12,6 +12,14 @@ "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$", "^link_imported_static_exe::@ba7eb709d0b48779c6c8$" ], + "abstractTargetIds": [ + "^imported_exe::@ba7eb709d0b48779c6c8$", + "^imported_interface_lib::@ba7eb709d0b48779c6c8$", + "^imported_lib::@ba7eb709d0b48779c6c8$", + "^imported_object_lib::@ba7eb709d0b48779c6c8$", + "^imported_shared_lib::@ba7eb709d0b48779c6c8$", + "^imported_static_lib::@ba7eb709d0b48779c6c8$" + ], "projectName": "Imported", "minimumCMakeVersion": "3.13", "hasInstallRule": true, @@ -34,7 +42,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 32, + "line": 35, "command": "install", "hasParent": true }, @@ -64,7 +72,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 35, + "line": 38, "command": "install", "hasParent": true }, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json index 08edd649ab..eb6451e707 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json @@ -8,6 +8,9 @@ "^ZERO_CHECK::@25b7fa8ea00134654b85$", "^iface_srcs::@25b7fa8ea00134654b85$" ], + "abstractTargetIds": [ + "^iface_none::@25b7fa8ea00134654b85$" + ], "projectName": "Interface", "minimumCMakeVersion": "3.13", "hasInstallRule": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json index 48c3a9d172..06f6dba6eb 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json @@ -11,6 +11,7 @@ "^cxx_object_exe::@5ed5358f70faf8d8af7a$", "^cxx_object_lib::@5ed5358f70faf8d8af7a$" ], + "abstractTargetIds": null, "projectName": "Object", "minimumCMakeVersion": "3.13", "hasInstallRule": true, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/subdir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/subdir.json index 996da471cc..1595c283cf 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/subdir.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/subdir.json @@ -4,6 +4,7 @@ "parentSource": "^\\.$", "childSources": null, "targetIds": null, + "abstractTargetIds": null, "projectName": "codemodel-v2", "minimumCMakeVersion": "3.13", "hasInstallRule": null, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json index a72eb1dd45..a32631f324 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json @@ -27,6 +27,9 @@ "^c_subdir::@6890427a1f51a3e7e1df$", "^interface_exe::@6890427a1f51a3e7e1df$" ], + "abstractTargetIds": [ + "^interface_lib::@6890427a1f51a3e7e1df$" + ], "projectName": "codemodel-v2", "minimumCMakeVersion": "3.13", "hasInstallRule": true, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/alias.json index 8ede60f0d5..d2e7e7152a 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/alias.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/alias.json @@ -10,5 +10,6 @@ "^ZERO_CHECK::@53632cba2752272bb008$", "^c_alias_exe::@53632cba2752272bb008$", "^cxx_alias_exe::@53632cba2752272bb008$" - ] + ], + "abstractTargetIds": null } diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json index 9309407398..816e42adbb 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json @@ -32,5 +32,8 @@ "^c_subdir::@6890427a1f51a3e7e1df$", "^c_headers_1::@6b8db101d64c125f29fe$", "^c_headers_2::@6b8db101d64c125f29fe$" + ], + "abstractTargetIds": [ + "^interface_lib::@6890427a1f51a3e7e1df$" ] } diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/custom.json index 0aeb727c72..90495a3150 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/custom.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/custom.json @@ -10,5 +10,6 @@ "^ZERO_CHECK::@c11385ffed57b860da63$", "^custom_tgt::@c11385ffed57b860da63$", "^custom_exe::@c11385ffed57b860da63$" - ] + ], + "abstractTargetIds": null } diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json index c8a1a83341..38149eeb7f 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json @@ -21,5 +21,6 @@ "^cxx_shared_exe::@a56b12a3f5c0529fb296$", "^cxx_static_lib::@a56b12a3f5c0529fb296$", "^cxx_static_exe::@a56b12a3f5c0529fb296$" - ] + ], + "abstractTargetIds": null } diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/external.json index 3c9afff110..68f948cc15 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/external.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/external.json @@ -9,5 +9,6 @@ "^ALL_BUILD::@[0-9a-f]+$", "^ZERO_CHECK::@[0-9a-f]+$", "^generated_exe::@[0-9a-f]+$" - ] + ], + "abstractTargetIds": null } diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/framework.json index 259ead1f39..67768fd36b 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/framework.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/framework.json @@ -11,5 +11,8 @@ "^shared_framework::@217a96c3a62328a73ef4$", "^static_framework::@217a96c3a62328a73ef4$", "^exe_framework::@217a96c3a62328a73ef4$" + ], + "abstractTargetIds": [ + "^import_framework::@217a96c3a62328a73ef4$" ] } diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/imported.json index dc40b72d91..c8449bd855 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/imported.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/imported.json @@ -13,5 +13,13 @@ "^link_imported_static_exe::@ba7eb709d0b48779c6c8$", "^link_imported_object_exe::@ba7eb709d0b48779c6c8$", "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$" + ], + "abstractTargetIds": [ + "^imported_exe::@ba7eb709d0b48779c6c8$", + "^imported_lib::@ba7eb709d0b48779c6c8$", + "^imported_interface_lib::@ba7eb709d0b48779c6c8$", + "^imported_object_lib::@ba7eb709d0b48779c6c8$", + "^imported_shared_lib::@ba7eb709d0b48779c6c8$", + "^imported_static_lib::@ba7eb709d0b48779c6c8$" ] } diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json index 2a22767628..0ee4c9e5ec 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json @@ -9,5 +9,8 @@ "^ALL_BUILD::@25b7fa8ea00134654b85$", "^ZERO_CHECK::@25b7fa8ea00134654b85$", "^iface_srcs::@25b7fa8ea00134654b85$" + ], + "abstractTargetIds": [ + "^iface_none::@25b7fa8ea00134654b85$" ] } diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/object.json index 219f4eb287..37c0c42f16 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/object.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/object.json @@ -12,5 +12,6 @@ "^c_object_exe::@5ed5358f70faf8d8af7a$", "^cxx_object_lib::@5ed5358f70faf8d8af7a$", "^cxx_object_exe::@5ed5358f70faf8d8af7a$" - ] + ], + "abstractTargetIds": null } diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json index 63493c9120..19d840aeea 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json @@ -4,6 +4,9 @@ "directorySource": "^alias$", "projectName": "Alias", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json index 411057cb14..b9b305aeb3 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json @@ -4,6 +4,9 @@ "directorySource": "^custom$", "projectName": "Custom", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json index 3a83d29cfc..21046bb386 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json index ebda41465e..18c4a7afb9 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json @@ -4,6 +4,9 @@ "directorySource": "^.*/Tests/RunCMake/FileAPIExternalSource$", "projectName": "External", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_framework.json index a4d806aeed..563d026369 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_framework.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_framework.json @@ -4,6 +4,9 @@ "directorySource": "^framework$", "projectName": "Framework", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json index 579a103fc6..cdf9b23c87 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json @@ -4,6 +4,9 @@ "directorySource": "^imported$", "projectName": "Imported", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json index ec03531ad3..bde9ddf9a2 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json @@ -4,6 +4,9 @@ "directorySource": "^interface$", "projectName": "Interface", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json index f1458962af..aa1c753f25 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json @@ -4,6 +4,9 @@ "directorySource": "^object$", "projectName": "Object", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json index ec72eb8338..4559e11956 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json @@ -4,6 +4,9 @@ "directorySource": "^\\.$", "projectName": "codemodel-v2", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_import_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_import_framework.json new file mode 100644 index 0000000000..aa546e19db --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_import_framework.json @@ -0,0 +1,9 @@ +{ + "nameOnDisk": "^Foo", + "artifacts": [ + { + "path": "^/usr/Frameworks/Foo.framework/Foo$", + "_dllExtra": false + } + ] +} diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json index 74b32875bb..684ae810ca 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json @@ -4,6 +4,9 @@ "directorySource": "^alias$", "projectName": "Alias", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json index 2defdaa910..709a5476e5 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json @@ -4,6 +4,9 @@ "directorySource": "^\\.$", "projectName": "codemodel-v2", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json index 0e10b52a9c..5a3de79bb4 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json @@ -4,6 +4,9 @@ "directorySource": "^fileset$", "projectName": "codemodel-v2", "type": "STATIC_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": [ { diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json index 7d767be739..9b23068c9c 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json @@ -4,6 +4,9 @@ "directorySource": "^fileset$", "projectName": "codemodel-v2", "type": "STATIC_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": [ { diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json index 04452c443a..4b561d65e7 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json @@ -4,6 +4,9 @@ "directorySource": "^\\.$", "projectName": "codemodel-v2", "type": "STATIC_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json index 3034e980fd..0ef78284d2 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json @@ -4,6 +4,9 @@ "directorySource": "^object$", "projectName": "Object", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json index ec0fdc6fcf..75764f484b 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json @@ -4,6 +4,9 @@ "directorySource": "^object$", "projectName": "Object", "type": "OBJECT_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json index a9350a115a..167958971f 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json @@ -4,6 +4,9 @@ "directorySource": "^\\.$", "projectName": "codemodel-v2", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json index 9bfa73ba17..3bb52dbab5 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json @@ -4,6 +4,9 @@ "directorySource": "^\\.$", "projectName": "codemodel-v2", "type": "SHARED_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json index f872b4c8f7..c5ef967f3e 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json @@ -4,6 +4,9 @@ "directorySource": "^\\.$", "projectName": "codemodel-v2", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json index 7d7ab8dab4..16bde731dc 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json @@ -4,6 +4,9 @@ "directorySource": "^\\.$", "projectName": "codemodel-v2", "type": "STATIC_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json index 3ffdbac83c..961b361d11 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json @@ -4,6 +4,9 @@ "directorySource": "^\\.$", "projectName": "codemodel-v2", "type": "STATIC_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json index 449c261c04..788fc50514 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json @@ -4,6 +4,9 @@ "directorySource": "^custom$", "projectName": "Custom", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json index 23f8e5238f..b83d21d734 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json @@ -4,6 +4,9 @@ "directorySource": "^custom$", "projectName": "Custom", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json index a2d3ca4d5b..b42e3699ea 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json @@ -4,6 +4,9 @@ "directorySource": "^alias$", "projectName": "Alias", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json index 86d70d660c..1a56f3ef10 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_cross_emulator.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_cross_emulator.json index a1b15caab1..e06c14461c 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_cross_emulator.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_cross_emulator.json @@ -4,6 +4,9 @@ "directorySource": "^cxx/cross$", "projectName": "Cxx", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_cross_emulator_args.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_cross_emulator_args.json index 24a7550ad0..7391fbf5bf 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_cross_emulator_args.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_cross_emulator_args.json @@ -4,6 +4,9 @@ "directorySource": "^cxx/cross$", "projectName": "Cxx", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher.json index 4988f04962..f6f1c08293 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher_and_cross_emulator.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher_and_cross_emulator.json index 8facf86aa9..0d2b81ca30 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher_and_cross_emulator.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_test_launcher_and_cross_emulator.json @@ -4,6 +4,9 @@ "directorySource": "^cxx/cross$", "projectName": "Cxx", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json index 2f8d6ed847..a7b0872b5a 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "STATIC_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json index 6655215703..bdeef7f8f4 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json @@ -4,6 +4,9 @@ "directorySource": "^object$", "projectName": "Object", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json index cc2deeb53f..37cbab0ca9 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json @@ -4,6 +4,9 @@ "directorySource": "^object$", "projectName": "Object", "type": "OBJECT_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json index 9ac7b7c2f2..21fc7ea1a1 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json index 5318b5204f..67871304e1 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "SHARED_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json index 45ab35c199..8c748a4e1c 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json index e04b988435..2cf5c27c55 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json index 080887703a..2b7f31e834 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json index 90ea0dffcf..c15d2736b1 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "STATIC_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/exe_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/exe_framework.json index d5d65224f6..4bf0f35a72 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/exe_framework.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/exe_framework.json @@ -4,6 +4,9 @@ "directorySource": "^framework$", "projectName": "Framework", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json index f1ef8dd631..c0efcacdbd 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json @@ -4,6 +4,9 @@ "directorySource": "^.*/Tests/RunCMake/FileAPIExternalSource$", "projectName": "External", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_none.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_none.json new file mode 100644 index 0000000000..9d06518996 --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_none.json @@ -0,0 +1,38 @@ +{ + "name": "iface_none", + "id": "^iface_none::@25b7fa8ea00134654b85$", + "directorySource": "^interface$", + "projectName": "Interface", + "type": "INTERFACE_LIBRARY", + "imported": null, + "local": null, + "abstract": true, + "isGeneratorProvided": null, + "fileSets": null, + "sources": [], + "sourceGroups": null, + "compileGroups": null, + "backtrace": [ + { + "file": "^interface/CMakeLists\\.txt$", + "line": 2, + "command": "add_library", + "hasParent": true + }, + { + "file": "^interface/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ], + "folder": null, + "nameOnDisk": null, + "artifacts": null, + "build": "^interface$", + "source": "^interface$", + "install": null, + "link": null, + "archive": null, + "dependencies": null +} diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json index bd698d579d..e2c652ae82 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json @@ -4,6 +4,9 @@ "directorySource": "^interface$", "projectName": "Interface", "type": "INTERFACE_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/import_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/import_framework.json new file mode 100644 index 0000000000..a02267db40 --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/import_framework.json @@ -0,0 +1,47 @@ +{ + "name": "import_framework", + "id": "^import_framework::@217a96c3a62328a73ef4$", + "directorySource": "^framework$", + "projectName": "Framework", + "type": "SHARED_LIBRARY", + "imported": true, + "local": true, + "abstract": true, + "isGeneratorProvided": null, + "fileSets": null, + "sources": [], + "sourceGroups": null, + "compileGroups": null, + "backtrace": [ + { + "file": "^framework/CMakeLists\\.txt$", + "line": 11, + "command": "add_library", + "hasParent": true + }, + { + "file": "^framework/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ], + "folder": null, + "nameOnDisk": "^(lib|cyg|msys-)?Foo(\\.(so|dll))?$", + "artifacts": [ + { + "path": "^/usr/Frameworks/Foo.framework/Foo(\\.(so|dll))?$", + "_dllExtra": false + }, + { + "path": "^/usr/Frameworks/Foo.framework/(lib)?Foo\\.(dll\\.a|lib|l)$", + "_dllExtra": true + } + ], + "build": "^framework$", + "source": "^framework$", + "install": null, + "link": null, + "archive": null, + "dependencies": null +} diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_exe.json new file mode 100644 index 0000000000..a425846273 --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_exe.json @@ -0,0 +1,43 @@ +{ + "name": "imported_exe", + "id": "^imported_exe::@ba7eb709d0b48779c6c8$", + "directorySource": "^imported$", + "projectName": "Imported", + "type": "EXECUTABLE", + "imported": true, + "local": true, + "abstract": true, + "isGeneratorProvided": null, + "fileSets": null, + "sources": [], + "sourceGroups": null, + "compileGroups": null, + "backtrace": [ + { + "file": "^imported/CMakeLists\\.txt$", + "line": 5, + "command": "add_executable", + "hasParent": true + }, + { + "file": "^imported/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ], + "folder": null, + "nameOnDisk": "^imported_exe(\\.exe)?$", + "artifacts": [ + { + "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?imported_exe(\\.exe)?$", + "_dllExtra": false + } + ], + "build": "^imported$", + "source": "^imported$", + "install": null, + "link": null, + "archive": null, + "dependencies": null +} diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_interface_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_interface_lib.json new file mode 100644 index 0000000000..ca31d1108c --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_interface_lib.json @@ -0,0 +1,38 @@ +{ + "name": "imported_interface_lib", + "id": "^imported_interface_lib::@ba7eb709d0b48779c6c8$", + "directorySource": "^imported$", + "projectName": "Imported", + "type": "INTERFACE_LIBRARY", + "imported": true, + "local": true, + "abstract": true, + "isGeneratorProvided": null, + "fileSets": null, + "sources": [], + "sourceGroups": null, + "compileGroups": null, + "backtrace": [ + { + "file": "^imported/CMakeLists\\.txt$", + "line": 31, + "command": "add_library", + "hasParent": true + }, + { + "file": "^imported/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ], + "folder": null, + "nameOnDisk": null, + "artifacts": null, + "build": "^imported$", + "source": "^imported$", + "install": null, + "link": null, + "archive": null, + "dependencies": null +} diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_lib.json new file mode 100644 index 0000000000..ab8249aa4c --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_lib.json @@ -0,0 +1,38 @@ +{ + "name": "imported_lib", + "id": "^imported_lib::@ba7eb709d0b48779c6c8$", + "directorySource": "^imported$", + "projectName": "Imported", + "type": "UNKNOWN_LIBRARY", + "imported": true, + "local": true, + "abstract": true, + "isGeneratorProvided": null, + "fileSets": null, + "sources": [], + "sourceGroups": null, + "compileGroups": null, + "backtrace": [ + { + "file": "^imported/CMakeLists\\.txt$", + "line": 3, + "command": "add_library", + "hasParent": true + }, + { + "file": "^imported/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ], + "folder": null, + "nameOnDisk": null, + "artifacts": null, + "build": "^imported$", + "source": "^imported$", + "install": null, + "link": null, + "archive": null, + "dependencies": null +} diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_object_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_object_lib.json new file mode 100644 index 0000000000..a13372319c --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_object_lib.json @@ -0,0 +1,38 @@ +{ + "name": "imported_object_lib", + "id": "^imported_object_lib::@ba7eb709d0b48779c6c8$", + "directorySource": "^imported$", + "projectName": "Imported", + "type": "OBJECT_LIBRARY", + "imported": true, + "local": true, + "abstract": true, + "isGeneratorProvided": null, + "fileSets": null, + "sources": [], + "sourceGroups": null, + "compileGroups": null, + "backtrace": [ + { + "file": "^imported/CMakeLists\\.txt$", + "line": 26, + "command": "add_library", + "hasParent": true + }, + { + "file": "^imported/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ], + "folder": null, + "nameOnDisk": null, + "artifacts": null, + "build": "^imported$", + "source": "^imported$", + "install": null, + "link": null, + "archive": null, + "dependencies": null +} diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_shared_lib.json new file mode 100644 index 0000000000..12d6d01e28 --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_shared_lib.json @@ -0,0 +1,47 @@ +{ + "name": "imported_shared_lib", + "id": "^imported_shared_lib::@ba7eb709d0b48779c6c8$", + "directorySource": "^imported$", + "projectName": "Imported", + "type": "SHARED_LIBRARY", + "imported": true, + "local": true, + "abstract": true, + "isGeneratorProvided": null, + "fileSets": null, + "sources": [], + "sourceGroups": null, + "compileGroups": null, + "backtrace": [ + { + "file": "^imported/CMakeLists\\.txt$", + "line": 12, + "command": "add_library", + "hasParent": true + }, + { + "file": "^imported/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ], + "folder": null, + "nameOnDisk": "^(lib|cyg|msys-)?imported_shared\\.(so|dylib|dll)$", + "artifacts": [ + { + "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg|msys-)?imported_shared\\.(so|dylib|dll)$", + "_dllExtra": false + }, + { + "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?imported_shared\\.(dll\\.a|lib|l)$", + "_dllExtra": true + } + ], + "build": "^imported$", + "source": "^imported$", + "install": null, + "link": null, + "archive": null, + "dependencies": null +} diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_static_lib.json new file mode 100644 index 0000000000..4dc1382acc --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/imported_static_lib.json @@ -0,0 +1,43 @@ +{ + "name": "imported_static_lib", + "id": "^imported_static_lib::@ba7eb709d0b48779c6c8$", + "directorySource": "^imported$", + "projectName": "Imported", + "type": "STATIC_LIBRARY", + "imported": true, + "local": true, + "abstract": true, + "isGeneratorProvided": null, + "fileSets": null, + "sources": [], + "sourceGroups": null, + "compileGroups": null, + "backtrace": [ + { + "file": "^imported/CMakeLists\\.txt$", + "line": 20, + "command": "add_library", + "hasParent": true + }, + { + "file": "^imported/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ], + "folder": null, + "nameOnDisk": "^(lib)?imported_static\\.(a|lib|l)$", + "artifacts": [ + { + "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?imported_static\\.(a|lib|l)$", + "_dllExtra": false + } + ], + "build": "^imported$", + "source": "^imported$", + "install": null, + "link": null, + "archive": null, + "dependencies": null +} diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json index acd7d59769..3b00ce45fc 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json @@ -4,6 +4,9 @@ "directorySource": "^\\.$", "projectName": "codemodel-v2", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_lib.json new file mode 100644 index 0000000000..f64388b12b --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_lib.json @@ -0,0 +1,62 @@ +{ + "name": "interface_lib", + "id": "^interface_lib::@6890427a1f51a3e7e1df$", + "directorySource": "^\\.$", + "projectName": "codemodel-v2", + "type": "INTERFACE_LIBRARY", + "imported": null, + "local": null, + "abstract": true, + "isGeneratorProvided": null, + "fileSets": null, + "sources": [], + "sourceGroups": null, + "compileGroups": null, + "backtrace": [ + { + "file": "^include_test\\.cmake$", + "line": 1, + "command": "add_library", + "hasParent": true + }, + { + "file": "^include_test\\.cmake$", + "line": null, + "command": null, + "hasParent": true + }, + { + "file": "^codemodel-v2\\.cmake$", + "line": 7, + "command": "include", + "hasParent": true + }, + { + "file": "^codemodel-v2\\.cmake$", + "line": null, + "command": null, + "hasParent": true + }, + { + "file": "^CMakeLists\\.txt$", + "line": 3, + "command": "include", + "hasParent": true + }, + { + "file": "^CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ], + "folder": null, + "nameOnDisk": null, + "artifacts": null, + "build": "^\\.$", + "source": "^\\.$", + "install": null, + "link": null, + "archive": null, + "dependencies": null +} diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json index 531d8dc327..2ce0483992 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json @@ -4,6 +4,9 @@ "directorySource": "^imported$", "projectName": "Imported", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ @@ -16,7 +19,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 6, + "line": 9, "command": "add_executable", "hasParent": true }, @@ -52,7 +55,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 6, + "line": 9, "command": "add_executable", "hasParent": true }, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json index 691edffb79..5b2f02d893 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json @@ -4,6 +4,9 @@ "directorySource": "^imported$", "projectName": "Imported", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ @@ -16,7 +19,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 29, + "line": 32, "command": "add_executable", "hasParent": true }, @@ -52,7 +55,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 29, + "line": 32, "command": "add_executable", "hasParent": true }, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json index 555accc2d0..0636946916 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json @@ -4,6 +4,9 @@ "directorySource": "^imported$", "projectName": "Imported", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ @@ -16,7 +19,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 24, + "line": 27, "command": "add_executable", "hasParent": true }, @@ -52,7 +55,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 24, + "line": 27, "command": "add_executable", "hasParent": true }, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json index ead2362b6f..973497e08c 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json @@ -4,6 +4,9 @@ "directorySource": "^imported$", "projectName": "Imported", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ @@ -16,7 +19,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 14, + "line": 17, "command": "add_executable", "hasParent": true }, @@ -52,7 +55,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 14, + "line": 17, "command": "add_executable", "hasParent": true }, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json index 26dc9db6d4..6fc03fca08 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json @@ -4,6 +4,9 @@ "directorySource": "^imported$", "projectName": "Imported", "type": "EXECUTABLE", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ @@ -16,7 +19,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 19, + "line": 22, "command": "add_executable", "hasParent": true }, @@ -52,7 +55,7 @@ "backtrace": [ { "file": "^imported/CMakeLists\\.txt$", - "line": 19, + "line": 22, "command": "add_executable", "hasParent": true }, diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json index fab6f66e31..e75da1db1b 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json @@ -4,6 +4,9 @@ "directorySource": "^framework$", "projectName": "Framework", "type": "SHARED_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json index d6cbdedd14..c3877950fb 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json @@ -4,6 +4,9 @@ "directorySource": "^framework$", "projectName": "Framework", "type": "STATIC_LIBRARY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": null, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json index 7462f7f90c..229e356a88 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json @@ -4,6 +4,9 @@ "directorySource": "^alias$", "projectName": "Alias", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json index abc5084561..ac358da372 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json @@ -4,6 +4,9 @@ "directorySource": "^custom$", "projectName": "Custom", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json index af4248c6b5..3f869626e9 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json @@ -4,6 +4,9 @@ "directorySource": "^cxx$", "projectName": "Cxx", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json index a7b8bb0d83..752e40a016 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json @@ -4,6 +4,9 @@ "directorySource": "^.*/Tests/RunCMake/FileAPIExternalSource$", "projectName": "External", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_framework.json index 62065176e8..28eaa3d28c 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_framework.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_framework.json @@ -4,6 +4,9 @@ "directorySource": "^framework$", "projectName": "Framework", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json index ed3da5f712..229b8aa714 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json @@ -4,6 +4,9 @@ "directorySource": "^imported$", "projectName": "Imported", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json index 178f9ef81e..f2a803e7c0 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json @@ -4,6 +4,9 @@ "directorySource": "^interface$", "projectName": "Interface", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json index 341647b483..f031420c68 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json @@ -4,6 +4,9 @@ "directorySource": "^object$", "projectName": "Object", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json index b3827eda43..0b3ea48fe6 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json @@ -4,6 +4,9 @@ "directorySource": "^\\.$", "projectName": "codemodel-v2", "type": "UTILITY", + "imported": null, + "local": null, + "abstract": null, "isGeneratorProvided": true, "fileSets": null, "sources": [ diff --git a/Tests/RunCMake/FileAPI/imported/CMakeLists.txt b/Tests/RunCMake/FileAPI/imported/CMakeLists.txt index 770838b6a7..706fc73065 100644 --- a/Tests/RunCMake/FileAPI/imported/CMakeLists.txt +++ b/Tests/RunCMake/FileAPI/imported/CMakeLists.txt @@ -3,6 +3,9 @@ project(Imported) add_library(imported_lib UNKNOWN IMPORTED) set_target_properties(imported_lib PROPERTIES IMPORTED_LOCATION "imported_unk${CMAKE_STATIC_LIBRARY_SUFFIX}") add_executable(imported_exe IMPORTED) +set_target_properties(imported_exe PROPERTIES + IMPORTED_LOCATION "imported_exe${CMAKE_EXECUTABLE_SUFFIX}" +) add_executable(link_imported_exe ../empty.c) target_link_libraries(link_imported_exe PRIVATE imported_lib)