Visit the code: github
I hate CMake when I learned to write my first C++ program. I hate Visual Studio and Xcode too. So I decided to use clang and CMake to build my C++ program. Clang is a good compiler, but CMake is terrible.
I found ninja when I searched new C++ build system. Ninja is a fast build system, but we should add every file by myself. So I decided to create a new language to transform the ninja file.
The first thing is define the group. The group likes a struct, you should add function in the group. The group will help you to manager the function. Writing function anywhere is not a good idea.
I decide to join Compiler Group, Files Group and Project Group firstly. Compiler Group will create the compiler infomation.
$string($compiler_path, "/bin/clang++")
@compiler(compiler_path)
language_version("c++23")
standard_library("libc++")
compiler_debug()
;
Enter fullscreen mode Exit fullscreen mode
Files Group will search file in the program folder.
@files("source")
recursion_folder("src", ".cpp")
;
Enter fullscreen mode Exit fullscreen mode
Project Group will add all Files Group and Library.
@project("pwmake", "binary")
source_files("source")
;
Enter fullscreen mode Exit fullscreen mode
The binary mean build a binary execute file. It also support static(static library) and shared(dynamic library).
See other detail in the PWMake Documnet.
It’s the first version about PWMake. Maybe It lost so many function and have so many bug. Looking forward to next stable version.If you have new idea or bug, make a issue in github.If you want to pull request, welcome to pull it.
Enjoy.
답글 남기기