{"id":28629775,"url":"https://github.com/fibjs/build_tools","last_synced_at":"2026-02-24T09:04:43.162Z","repository":{"id":80746204,"uuid":"378069688","full_name":"fibjs/build_tools","owner":"fibjs","description":"fibjs's build_tools based on .cmake","archived":false,"fork":false,"pushed_at":"2025-12-05T13:13:46.000Z","size":3896,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-12-05T13:56:31.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fibjs.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,"zenodo":null}},"created_at":"2021-06-18T07:28:33.000Z","updated_at":"2025-12-05T13:13:50.000Z","dependencies_parsed_at":"2024-02-06T18:31:24.557Z","dependency_job_id":"da4dff2e-fdfd-4002-9ea3-1165a6bbc00a","html_url":"https://github.com/fibjs/build_tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fibjs/build_tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibjs%2Fbuild_tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibjs%2Fbuild_tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibjs%2Fbuild_tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibjs%2Fbuild_tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fibjs","download_url":"https://codeload.github.com/fibjs/build_tools/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibjs%2Fbuild_tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29777623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T04:54:30.205Z","status":"ssl_error","status_checked_at":"2026-02-24T04:53:58.628Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-06-12T12:13:33.762Z","updated_at":"2026-02-24T09:04:41.936Z","avatar_url":"https://github.com/fibjs.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# build_tools\n\nfibjs's build_tools based on .cmake\n\n# Getting Started\n\nTo use build_tools for fibjs, you need install:\n\n- CMake \u003e= 3.0\n- C/Cpp Compiler\n  - Windows: clang/VC++\n  - Linux: clang\n  - MacOS: clang\n\nTo explain how to use built_tools, we try to compile [examples/hello](./examples/hello/build.cmake).\n\nAll `\u003cbuilt_tool_path\u003e` in codes refers to this project's root path.\n\n### Workflow on CMake ccripts\n\nWe recommend CMake script-mode as build workflow, that is, instead of bash/sh/cmd/powershell, just use CMake script to\ndrive your build.\n\n```CMake\ninclude(\u003cbuilt_tool_path\u003e/cmake-scripts/get_env.cmake)\n\nset(WORK_ROOT \"${CMAKE_CURRENT_SOURCE_DIR}/output\")\n\nset(BIN_ROOT \"${WORK_ROOT}/bin\")\nset(OUT_ROOT \"${WORK_ROOT}/out\")\nset(DIST_DIRNAME \"${CMAKE_HOST_SYSTEM_NAME}_${BUILD_ARCH}_${BUILD_TYPE}\")\n\nif(\"${CLEAN_BUILD}\" STREQUAL \"true\")\n    rimraf(${BIN_ROOT}/${DIST_DIRNAME})\n    rimraf(${OUT_ROOT}/${DIST_DIRNAME})\nelse()\n    set(OUT_PATH \"${OUT_ROOT}/${DIST_DIRNAME}\")\n\n    build(\"${CMAKE_CURRENT_SOURCE_DIR}\" \"${OUT_PATH}/hello\")\n\n    if(EXISTS \"${CMAKE_CURRENT_SOURCE_DIR}/test\")\n        build(\"${CMAKE_CURRENT_SOURCE_DIR}/test\" \"${OUT_PATH}/hello_test\")\n    endif()\nendif()\n```\n\nAs of this script, `build` funciton is defined in `\u003cbuilt_tool_path\u003e/cmake-scripts/get_env.cmake`.\n\n```CMake\nbuild(src_dirname, outputpath)\n```\n\nIt tried to find `\u003csrc_dirname\u003e/CMakeLists.txt` and run do cmake build against it. That is, you can customize by writing your own CMakeList.txt\n\n### Create CMakeLists.txt\n\nAdd one CMakeLists.txt on your project. like [examples/hello/CMakeLists.txt](./examples/hello/CMakeLists.txt).\n\nTo build one **static** Library, include `cmake/Library.cmake`\n\n```CMake\ncmake_minimum_required(VERSION 3.10)\n\ninclude(\u003cbuilt_tool_path\u003e/cmake/Library.cmake)\n```\n\nOr put one CMakeLists.txt on project_root's test directory, like [examples/hello/test/CMakeLists.txt](./examples/hello/test/CMakeLists.txt).\n\nTo build one **test** executation, include `cmake/LibraryTest.cmake`\n\n```CMake\ncmake_minimum_required(VERSION 3.10)\n\ninclude(\u003cbuilt_tool_path\u003e/cmake/LibraryTest.cmake)\n```\n\n### Run CMake\n\n```bash\ncmake -DBUILD_ARCH=x64\\\n    -DBUILD_TYPE=release\\\n    -DCLEAN_BUILD=\"\"\\\n    -DBUILD_JOBS=4\\\n    -DBUILD_WITH_MSVC=1\\\n    -P build.cmake\n```\n\nsee more configuration on\n\n- [examples/hello/build](./examples/hello/build) for bash\n- [examples/hello/build.cmd](./examples/hello/build.cmd) for windows cmd\n\n## Copyright\n\n[MIT](./LICENSE) License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibjs%2Fbuild_tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffibjs%2Fbuild_tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibjs%2Fbuild_tools/lists"}