{"task": {"agent_timeout": 3000, "task": "conan-io__conan-12762", "verifier_timeout": 6000, "instruction": "[feature] Allow specifying an install component for the CMake helper\nOne is capable of passing `--component` to CMake's `--install` command, however the same functionality is missing from the CMake helper's `install()` method: https://docs.conan.io/en/latest/reference/build_helpers/cmake.html#install\n\nSince Conan does not package CMake configs generated by recipes, in many cases the recipe can just define the runtime component and there won't be a need to `rmdir` additional files.\n\nI suggest adding a `component=None` argument to this method and restructuring it in terms of the cmake generated `cmake_install.cmake` script. The code would look something like this:\n\n```py\ndef install(... component=None):\n    if component is not None:\n        if isinstance(component, str):\n            component_args = [f\"-DCOMPONENT={component}\"]\n        else:\n            component_args = [f\"-DCOMPONENT={c}\" for c in component]\n    else:\n        component_args = [\"\"]\n    for comp in component_args:\n        self.run(f\"cmake -DBUILD_TYPE={build_type} {comp} -P cmake_install.cmake\", cwd=bindir)\n```\n\nor maybe a new method like `install_component()` with a required positional argument, if such a break for v2 is not desirable.  \n`find -name conanfile.py -exec grep -nHEe '\\.install\\([^)]' {} \\;` shows no usage for this method being used with any arguments in CCI though.\n\n- [x] I've read the [CONTRIBUTING guide](https://github.com/conan-io/conan/blob/develop/.github/CONTRIBUTING.md).\n", "memory": "8192m", "runnable": false, "difficulty": "hard", "language": "", "cpus": 1, "instruction_truncated": false, "category": "debugging", "compose": false, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "swegym", "tags": ["debugging", "swe-bench"]}, "runs": []}