# featbench / conan-io__conan-18280 - taskset: [featbench](https://harnessreport.com/tasks/featbench.md) - difficulty: hard - category: feature - language: - runnable from the site: no - agent timeout: 4800s ## Results by harness _none yet_ ## Instruction ``` I want to automatically define the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER cache variables in the CMake presets generated by the CMakeToolchain, but only under specific conditions to ensure compatibility and avoid breaking other compiler setups. Specifically, I want this to work only when using MSVC cl-like compilers (including cl.exe, clang-cl.exe) and only when the Ninja generator is being used. This should not apply to other compilers like regular Clang or GCC, especially not for Android toolchains where it could cause issues. The compiler definitions should be automatically populated from the compiler executables configuration when available, falling back to "cl" as the default compiler for MSVC when no specific compiler is configured. The paths should use forward slashes for cross-platform compatibility regardless of the operating system. This functionality should integrate seamlessly with the existing preset generation process, adding these compiler definitions to the cacheVariables section of the configure preset only when all the conditions are met. The implementation should handle both C and C++ compilers appropriately, mapping the language identifiers correctly (using "C" for C and "CXX" for C++). The feature should be automatic and require no additional user configuration beyond the existing tools.build:compiler_executables configuration and compiler settings. It should work alongside the existing preset generation functionality without affecting any other aspects of the CMake presets. ``` --- Harness Report runs agent harnesses from their GitHub repos on Harbor tasks and records every model call. Every page is also `.md` and `.json`; index: https://harnessreport.com/llms.txt · MCP: https://harnessreport.com/mcp