{"id":22370045,"url":"https://github.com/andreicherniaev/cmake-presets-set-compiler-option","last_synced_at":"2026-01-06T08:04:19.710Z","repository":{"id":245125156,"uuid":"817338625","full_name":"AndreiCherniaev/cmake-presets-set-compiler-option","owner":"AndreiCherniaev","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-19T13:51:07.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T19:42:44.876Z","etag":null,"topics":["bit-field","compiler","example","warning","wno-packed-bitfield-compat"],"latest_commit_sha":null,"homepage":"https://stackoverflow.com/questions/41253759/ignoring-note-offset-of-packed-bit-field-without-using-wno-packed-bitfield-co","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndreiCherniaev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-06-19T13:50:55.000Z","updated_at":"2024-06-19T13:53:27.000Z","dependencies_parsed_at":"2024-06-20T00:25:24.408Z","dependency_job_id":null,"html_url":"https://github.com/AndreiCherniaev/cmake-presets-set-compiler-option","commit_stats":null,"previous_names":["andreicherniaev/cmake-presets-set-compiler-option"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiCherniaev%2Fcmake-presets-set-compiler-option","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiCherniaev%2Fcmake-presets-set-compiler-option/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiCherniaev%2Fcmake-presets-set-compiler-option/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiCherniaev%2Fcmake-presets-set-compiler-option/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreiCherniaev","download_url":"https://codeload.github.com/AndreiCherniaev/cmake-presets-set-compiler-option/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245690518,"owners_count":20656601,"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":["bit-field","compiler","example","warning","wno-packed-bitfield-compat"],"created_at":"2024-12-04T19:32:08.021Z","updated_at":"2026-01-06T08:04:14.676Z","avatar_url":"https://github.com/AndreiCherniaev.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"You can set compiler option or disable compiler warning using two ways.\n## CMakeLists.txt way\nAdd string like this. Note that you should add it after add_executable().\n```\ntarget_compile_options(${PROJECT_NAME} PRIVATE -Wno-packed-bitfield-compat)\n```\n\n## CMakePresets.json way\nMake CMakePresets.json and add\n```\n      \"cacheVariables\": {\n      \t\"CMAKE_CXX_FLAGS\": \"-Wno-packed-bitfield-compat\"\n      }\n```\nAnd build your project\n```\ncmake -S src/ -DCMAKE_BUILD_TYPE=Release --preset \"HabrPresetName\"\ncmake --build build/ --parallel\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreicherniaev%2Fcmake-presets-set-compiler-option","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreicherniaev%2Fcmake-presets-set-compiler-option","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreicherniaev%2Fcmake-presets-set-compiler-option/lists"}