{"id":17190719,"url":"https://github.com/dyollb/cmake_mixed_toolset","last_synced_at":"2026-01-06T05:04:07.712Z","repository":{"id":96260072,"uuid":"317558157","full_name":"dyollb/cmake_mixed_toolset","owner":"dyollb","description":"This little example project makes use of ExternalProject to build specific libraries with a different CMAKE_GENERATOR_TOOLSET than the main project.","archived":false,"fork":false,"pushed_at":"2020-12-07T09:29:36.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T05:27:32.095Z","etag":null,"topics":["cmake","cxx","msvc","toolsets"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dyollb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-01T13:57:35.000Z","updated_at":"2022-03-17T08:13:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"cdfbc282-ee7d-4002-9299-205aa3162f9b","html_url":"https://github.com/dyollb/cmake_mixed_toolset","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyollb%2Fcmake_mixed_toolset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyollb%2Fcmake_mixed_toolset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyollb%2Fcmake_mixed_toolset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyollb%2Fcmake_mixed_toolset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyollb","download_url":"https://codeload.github.com/dyollb/cmake_mixed_toolset/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407772,"owners_count":20610234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cxx","msvc","toolsets"],"created_at":"2024-10-15T01:23:42.689Z","updated_at":"2026-01-06T05:04:02.668Z","avatar_url":"https://github.com/dyollb.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example CMake Configuration for Targets with Different Toolsets\n\nIn the company where I work, we usually build our numerical solvers with the Intel C++ compilers, because it (traditionally) has better vectorization, and other optimizations than MSVC.\nWIN32 libraries built with Intel and MSVC are ABI compatible (they use the same base toolset, e.g. v140 for Visual Studio 2015).\n\n### Mixing toolsets with ExternalProject\nThis little example project makes use of `ExternalProject` to build specific libraries with a different `CMAKE_GENERATOR_TOOLSET` than the main project.\nThose libraries are then configured and built in a separate solution, into the same output directories. The main project orchestrates this, using dependencies.\n\n### Why not use VS_PLATFORM_TOOLSET?\nUnfortunately, the `VS_PLATFORM_TOOLSET` property is not intended for this kind of mixing of toolsets, and may lead to subtle problems, because CMake caches global settings for one single toolset (See [17358](https://gitlab.kitware.com/cmake/cmake/-/issues/17358), [20590](https://gitlab.kitware.com/cmake/cmake/-/issues/20590)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyollb%2Fcmake_mixed_toolset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyollb%2Fcmake_mixed_toolset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyollb%2Fcmake_mixed_toolset/lists"}