tl;dr: CMakeSL is now able to build itself. Read along to find out what changes have been made since last reddit post and a short video from CMakeSL building.
- The CMakeSL repo
- Small updates are posted on twitter
- Bigger ones on my page. Here's the rss.
- The biggest ones on r/cpp
Documents like the README, all files in doc
are highly WIP, so they are not up-to-date, they are not pretty etc, so please don't rely on them.
Today the CMakeSL has built itself for the first time (including tests). When you develop project like this, the point when the project is able to handle itself is really satisfying. I'm pretty happy with this fact and wanted to give a quick update (:
Last post on reddit was about creation of abseil-cpp CMakeSL scripts. There I posted that I've created CMakeSL scripts for the abseil-cpp project and said that next update will be when CMakeSL builds it. Well, CMakeSL is not able to handle this project yet (now I realized that I didn't try, maybe it is).
Here's a rough changelog. It's based on github pull request, so it's not ideal, but I don't remember all this stuff.
- cmake::cxx_standard variable
- comments
- builtin extern<> type
- cmake::visibility enum support
- testing support
- cmake::install() function
- export/import, modules (yay. Big one too)
- cmake::get_cxx_compiler_info() function
- cmake::module_path variable
- cmake::message, warning, error and fatal_error
- option builtin type
- enums
- unary operators
- namespaced functions
- namespaced types
- designated initializers
- ternary operator
- namespaces and handling namespaced identifiers (That was a big one)
- for loop
- function return type deduction (The
auto
for function return type) - void type
- variable type deduction (The
auto
for variables)
There are a couple of things that you may have not noticed but are pretty neat considering what CMakeSL does. Just to name a few:
- The biggest one is adding subdirectories with old
CMakeLists.txt
scripts. This allows you to use external libraries (like googletest in my case) that don't support CMakeSL yet (or never will). This also ease porting yourCMakeLists.txt
to CMakeSL. - The options passed from the command line (like
-DCMAKESL_WITH_TOOLS=ON
) are handled in bot old CMake and CMakeSL language. - There is an equivalent for
add_custom_command()
:cmake::add_custom_command()
. In CMakeSL building it's used to run a python script for code generation. - 'Modules', import/export etc. An example script which is imported in a couple of places
- Last but not least, the thing that I fought from the very beginning. Support of C++ tools (that don't need to know code semantic) out-of-the-box. All
CMakeLists.cmsl
scripts are formatted byclang-format
, using the.clang-format
file that is used to format a regular C++ code in the project. Even stuff like //clang-format: off work
Any thoughts? Leave a comment, issue or ask via email (you can find it on my page). And as always, I encourage you to contribute (: