mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
fileapi: Add test launcher to codemodel-v2
We do not need to bump the minor version because it was recently bumped by addition of the cross-compiling emulator as another kind of launcher.
This commit is contained in:
@@ -1022,6 +1022,10 @@ with members:
|
|||||||
An emulator for the target platform when cross-compiling.
|
An emulator for the target platform when cross-compiling.
|
||||||
See the :prop_tgt:`CROSSCOMPILING_EMULATOR` target property.
|
See the :prop_tgt:`CROSSCOMPILING_EMULATOR` target property.
|
||||||
|
|
||||||
|
``test``
|
||||||
|
A start program for the execution of tests.
|
||||||
|
See the :prop_tgt:`TEST_LAUNCHER` target property.
|
||||||
|
|
||||||
This field was added in codemodel version 2.7.
|
This field was added in codemodel version 2.7.
|
||||||
|
|
||||||
``link``
|
``link``
|
||||||
|
|||||||
@@ -2112,15 +2112,18 @@ Json::Value Target::DumpLauncher(const char* name, const char* type)
|
|||||||
Json::Value Target::DumpLaunchers()
|
Json::Value Target::DumpLaunchers()
|
||||||
{
|
{
|
||||||
Json::Value launchers;
|
Json::Value launchers;
|
||||||
bool allow =
|
{
|
||||||
this->GT->Makefile->GetDefinition("CMAKE_CROSSCOMPILING").IsOn();
|
Json::Value launcher = DumpLauncher("TEST_LAUNCHER", "test");
|
||||||
Json::Value launcher;
|
|
||||||
if (allow) {
|
|
||||||
launcher = DumpLauncher("CROSSCOMPILING_EMULATOR", "emulator");
|
|
||||||
if (!launcher.empty()) {
|
if (!launcher.empty()) {
|
||||||
launchers.append(std::move(launcher));
|
launchers.append(std::move(launcher));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this->GT->Makefile->IsOn("CMAKE_CROSSCOMPILING")) {
|
||||||
|
Json::Value emulator = DumpLauncher("CROSSCOMPILING_EMULATOR", "emulator");
|
||||||
|
if (!emulator.empty()) {
|
||||||
|
launchers.append(std::move(emulator));
|
||||||
|
}
|
||||||
|
}
|
||||||
return launchers;
|
return launchers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -809,6 +809,8 @@ def gen_check_targets(c, g, inSource):
|
|||||||
read_codemodel_json_data("targets/cxx_exe.json"),
|
read_codemodel_json_data("targets/cxx_exe.json"),
|
||||||
read_codemodel_json_data("targets/cxx_exe_cross_emulator.json"),
|
read_codemodel_json_data("targets/cxx_exe_cross_emulator.json"),
|
||||||
read_codemodel_json_data("targets/cxx_exe_cross_emulator_args.json"),
|
read_codemodel_json_data("targets/cxx_exe_cross_emulator_args.json"),
|
||||||
|
read_codemodel_json_data("targets/cxx_exe_test_launcher_and_cross_emulator.json"),
|
||||||
|
read_codemodel_json_data("targets/cxx_exe_test_launcher.json"),
|
||||||
read_codemodel_json_data("targets/cxx_standard_compile_feature_exe.json"),
|
read_codemodel_json_data("targets/cxx_standard_compile_feature_exe.json"),
|
||||||
read_codemodel_json_data("targets/cxx_standard_exe.json"),
|
read_codemodel_json_data("targets/cxx_standard_exe.json"),
|
||||||
read_codemodel_json_data("targets/cxx_shared_lib.json"),
|
read_codemodel_json_data("targets/cxx_shared_lib.json"),
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
"childSources": null,
|
"childSources": null,
|
||||||
"targetIds": [
|
"targetIds": [
|
||||||
"^cxx_exe_cross_emulator::@ee4a268216d1f53c4e2e$",
|
"^cxx_exe_cross_emulator::@ee4a268216d1f53c4e2e$",
|
||||||
"^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$"
|
"^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$",
|
||||||
|
"^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$"
|
||||||
],
|
],
|
||||||
"projectName": "Cxx",
|
"projectName": "Cxx",
|
||||||
"minimumCMakeVersion": "3.13",
|
"minimumCMakeVersion": "3.13",
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
"^ALL_BUILD::@a56b12a3f5c0529fb296$",
|
"^ALL_BUILD::@a56b12a3f5c0529fb296$",
|
||||||
"^ZERO_CHECK::@a56b12a3f5c0529fb296$",
|
"^ZERO_CHECK::@a56b12a3f5c0529fb296$",
|
||||||
"^cxx_exe::@a56b12a3f5c0529fb296$",
|
"^cxx_exe::@a56b12a3f5c0529fb296$",
|
||||||
|
"^cxx_exe_test_launcher::@a56b12a3f5c0529fb296$",
|
||||||
"^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
|
"^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
|
||||||
"^cxx_standard_exe::@a56b12a3f5c0529fb296$",
|
"^cxx_standard_exe::@a56b12a3f5c0529fb296$",
|
||||||
"^cxx_lib::@a56b12a3f5c0529fb296$",
|
"^cxx_lib::@a56b12a3f5c0529fb296$",
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
"^cxx_exe::@a56b12a3f5c0529fb296$",
|
"^cxx_exe::@a56b12a3f5c0529fb296$",
|
||||||
"^cxx_exe_cross_emulator::@ee4a268216d1f53c4e2e$",
|
"^cxx_exe_cross_emulator::@ee4a268216d1f53c4e2e$",
|
||||||
"^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$",
|
"^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$",
|
||||||
|
"^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$",
|
||||||
|
"^cxx_exe_test_launcher::@a56b12a3f5c0529fb296$",
|
||||||
"^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
|
"^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
|
||||||
"^cxx_standard_exe::@a56b12a3f5c0529fb296$",
|
"^cxx_standard_exe::@a56b12a3f5c0529fb296$",
|
||||||
"^cxx_shared_lib::@a56b12a3f5c0529fb296$",
|
"^cxx_shared_lib::@a56b12a3f5c0529fb296$",
|
||||||
|
|||||||
@@ -90,6 +90,14 @@
|
|||||||
"id": "^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$",
|
"id": "^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$",
|
||||||
"backtrace": null
|
"backtrace": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$",
|
||||||
|
"backtrace": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "^cxx_exe_test_launcher::@a56b12a3f5c0529fb296$",
|
||||||
|
"backtrace": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
|
"id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
|
||||||
"backtrace": null
|
"backtrace": null
|
||||||
|
|||||||
@@ -130,6 +130,14 @@
|
|||||||
"id": "^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$",
|
"id": "^cxx_exe_cross_emulator_args::@ee4a268216d1f53c4e2e$",
|
||||||
"backtrace": null
|
"backtrace": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$",
|
||||||
|
"backtrace": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "^cxx_exe_test_launcher::@a56b12a3f5c0529fb296$",
|
||||||
|
"backtrace": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
|
"id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
|
||||||
"backtrace": null
|
"backtrace": null
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
{
|
||||||
|
"name": "cxx_exe_test_launcher",
|
||||||
|
"id": "^cxx_exe_test_launcher::@a56b12a3f5c0529fb296$",
|
||||||
|
"directorySource": "^cxx$",
|
||||||
|
"projectName": "Cxx",
|
||||||
|
"type": "EXECUTABLE",
|
||||||
|
"isGeneratorProvided": null,
|
||||||
|
"fileSets": null,
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"path": "^empty\\.cxx$",
|
||||||
|
"isGenerated": null,
|
||||||
|
"fileSetName": null,
|
||||||
|
"sourceGroupName": "Source Files",
|
||||||
|
"compileGroupLanguage": "CXX",
|
||||||
|
"backtrace": [
|
||||||
|
{
|
||||||
|
"file": "^cxx/CMakeLists\\.txt$",
|
||||||
|
"line": 49,
|
||||||
|
"command": "add_executable",
|
||||||
|
"hasParent": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "^cxx/CMakeLists\\.txt$",
|
||||||
|
"line": null,
|
||||||
|
"command": null,
|
||||||
|
"hasParent": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sourceGroups": [
|
||||||
|
{
|
||||||
|
"name": "Source Files",
|
||||||
|
"sourcePaths": [
|
||||||
|
"^empty\\.cxx$"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"compileGroups": [
|
||||||
|
{
|
||||||
|
"language": "CXX",
|
||||||
|
"sourcePaths": [
|
||||||
|
"^empty\\.cxx$"
|
||||||
|
],
|
||||||
|
"includes": null,
|
||||||
|
"frameworks": null,
|
||||||
|
"defines": null,
|
||||||
|
"compileCommandFragments": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"backtrace": [
|
||||||
|
{
|
||||||
|
"file": "^cxx/CMakeLists\\.txt$",
|
||||||
|
"line": 49,
|
||||||
|
"command": "add_executable",
|
||||||
|
"hasParent": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "^cxx/CMakeLists\\.txt$",
|
||||||
|
"line": null,
|
||||||
|
"command": null,
|
||||||
|
"hasParent": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"folder": null,
|
||||||
|
"nameOnDisk": "^cxx_exe_test_launcher(\\.exe)?$",
|
||||||
|
"artifacts": [
|
||||||
|
{
|
||||||
|
"path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe_test_launcher(\\.exe)?$",
|
||||||
|
"_dllExtra": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe_test_launcher\\.pdb$",
|
||||||
|
"_dllExtra": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"build": "^cxx$",
|
||||||
|
"source": "^cxx$",
|
||||||
|
"install": null,
|
||||||
|
"launchers" : [
|
||||||
|
{
|
||||||
|
"command": "^no-such-launcher(\\.exe)?$",
|
||||||
|
"type" : "test"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"link": {
|
||||||
|
"language": "CXX",
|
||||||
|
"lto": null,
|
||||||
|
"commandFragments": [
|
||||||
|
{
|
||||||
|
"fragment" : ".*",
|
||||||
|
"role" : "flags",
|
||||||
|
"backtrace": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"archive": null,
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
|
||||||
|
"backtrace": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
{
|
||||||
|
"name": "cxx_exe_test_launcher_and_cross_emulator",
|
||||||
|
"id": "^cxx_exe_test_launcher_and_cross_emulator::@ee4a268216d1f53c4e2e$",
|
||||||
|
"directorySource": "^cxx/cross$",
|
||||||
|
"projectName": "Cxx",
|
||||||
|
"type": "EXECUTABLE",
|
||||||
|
"isGeneratorProvided": null,
|
||||||
|
"fileSets": null,
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"path": "^empty\\.cxx$",
|
||||||
|
"isGenerated": null,
|
||||||
|
"fileSetName": null,
|
||||||
|
"sourceGroupName": "Source Files",
|
||||||
|
"compileGroupLanguage": "CXX",
|
||||||
|
"backtrace": [
|
||||||
|
{
|
||||||
|
"file": "^cxx/cross/CMakeLists\\.txt$",
|
||||||
|
"line": 9,
|
||||||
|
"command": "add_executable",
|
||||||
|
"hasParent": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "^cxx/cross/CMakeLists\\.txt$",
|
||||||
|
"line": null,
|
||||||
|
"command": null,
|
||||||
|
"hasParent": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sourceGroups": [
|
||||||
|
{
|
||||||
|
"name": "Source Files",
|
||||||
|
"sourcePaths": [
|
||||||
|
"^empty\\.cxx$"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"compileGroups": [
|
||||||
|
{
|
||||||
|
"language": "CXX",
|
||||||
|
"sourcePaths": [
|
||||||
|
"^empty\\.cxx$"
|
||||||
|
],
|
||||||
|
"includes": null,
|
||||||
|
"frameworks": null,
|
||||||
|
"defines": null,
|
||||||
|
"compileCommandFragments": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"backtrace": [
|
||||||
|
{
|
||||||
|
"file": "^cxx/cross/CMakeLists\\.txt$",
|
||||||
|
"line": 9,
|
||||||
|
"command": "add_executable",
|
||||||
|
"hasParent": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "^cxx/cross/CMakeLists\\.txt$",
|
||||||
|
"line": null,
|
||||||
|
"command": null,
|
||||||
|
"hasParent": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"folder": null,
|
||||||
|
"nameOnDisk": "^cxx_exe_test_launcher_and_cross_emulator(\\.exe)?$",
|
||||||
|
"artifacts": [
|
||||||
|
{
|
||||||
|
"path": "^cxx/cross/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe_test_launcher_and_cross_emulator(\\.exe)?$",
|
||||||
|
"_dllExtra": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "^cxx/cross/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe_test_launcher_and_cross_emulator\\.pdb$",
|
||||||
|
"_dllExtra": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"build": "^cxx/cross$",
|
||||||
|
"source": "^cxx/cross$",
|
||||||
|
"install": null,
|
||||||
|
"launchers" : [
|
||||||
|
{
|
||||||
|
"command": "^no-such-launcher(\\.exe)?$",
|
||||||
|
"type" : "test"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "^no-such-emulator(\\.exe)?$",
|
||||||
|
"type" : "emulator"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"link": {
|
||||||
|
"language": "CXX",
|
||||||
|
"lto": null,
|
||||||
|
"commandFragments": [
|
||||||
|
{
|
||||||
|
"fragment" : ".*",
|
||||||
|
"role" : "flags",
|
||||||
|
"backtrace": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"archive": null,
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
|
||||||
|
"backtrace": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -46,4 +46,7 @@ if(_rdeps)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_executable(cxx_exe_test_launcher ../empty.cxx)
|
||||||
|
set_property(TARGET cxx_exe_test_launcher PROPERTY TEST_LAUNCHER no-such-launcher)
|
||||||
|
|
||||||
add_subdirectory(cross)
|
add_subdirectory(cross)
|
||||||
|
|||||||
@@ -5,3 +5,7 @@ set_property(TARGET cxx_exe_cross_emulator PROPERTY CROSSCOMPILING_EMULATOR no-s
|
|||||||
|
|
||||||
add_executable(cxx_exe_cross_emulator_args ../../empty.cxx)
|
add_executable(cxx_exe_cross_emulator_args ../../empty.cxx)
|
||||||
set_property(TARGET cxx_exe_cross_emulator_args PROPERTY CROSSCOMPILING_EMULATOR "no-such-emulator;arg1;arg2 with space")
|
set_property(TARGET cxx_exe_cross_emulator_args PROPERTY CROSSCOMPILING_EMULATOR "no-such-emulator;arg1;arg2 with space")
|
||||||
|
|
||||||
|
add_executable(cxx_exe_test_launcher_and_cross_emulator ../../empty.cxx)
|
||||||
|
set_property(TARGET cxx_exe_test_launcher_and_cross_emulator PROPERTY TEST_LAUNCHER "no-such-launcher")
|
||||||
|
set_property(TARGET cxx_exe_test_launcher_and_cross_emulator PROPERTY CROSSCOMPILING_EMULATOR "no-such-emulator")
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ set(properties
|
|||||||
|
|
||||||
# Metadata
|
# Metadata
|
||||||
"CROSSCOMPILING_EMULATOR" "emu" "<SAME>"
|
"CROSSCOMPILING_EMULATOR" "emu" "<SAME>"
|
||||||
|
"TEST_LAUNCHER" "test" "<SAME>"
|
||||||
)
|
)
|
||||||
|
|
||||||
prepare_target_types(executable
|
prepare_target_types(executable
|
||||||
|
|||||||
Reference in New Issue
Block a user