Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
start [2021/09/25 15:54] devastart [2023/07/24 15:25] (current) – [About Ctor] deva
Line 2: Line 2:
 Welcome to the official ctor.cc C++ build system website! Welcome to the official ctor.cc C++ build system website!
  
-> Have you ever wondered, why, when you are a C++ expert and want to compile a C++ project, you need to learn some //other// language (such as make, cmake, lua, python, m4, ...) to be able to compile your code?+> Have you ever wondered, why, when you are a C++ programmer and you want to compile a C++ project, you also need to learn some //other// language (such as make, cmake, lua, python, m4, ...) in order to be able to build your project?
  
 Well, wonder no more - **ctor** is here! Well, wonder no more - **ctor** is here!
  
-"'ctor" is an often used short-hand form of the word "constructor" referring to the class function that sets up the internals of an object in object oriented programming - so the intended pronunciation of "ctor" is "constructor".+"'ctor" is an often used short-hand form of the word "constructor" referring to the class function that sets up the internals of an object in object oriented programming - so the intended pronunciation of "ctor" is //constructor// but sometimes also referred to as //see-tor//.
  
 Ctor is a C++ based build system, making it possible to configure and build complex projects without writing a single line of non-C++. Ctor is a C++ based build system, making it possible to configure and build complex projects without writing a single line of non-C++.
Line 12: Line 12:
 It aims towards the feature-richness found in auto-tools and beyond, but with a compilation speed rivalling that of raw makefiles. It aims towards the feature-richness found in auto-tools and beyond, but with a compilation speed rivalling that of raw makefiles.
  
-=====Get it=====+And the //only// dependency is a functioning C++ compiler! 
 + 
 +======Get it======
 Clone: Clone:
 <code> <code>
Line 20: Line 22:
 Browse the sources: http://cgit.ctor.cc/ctor.git/ Browse the sources: http://cgit.ctor.cc/ctor.git/
  
-=====License=====+======License======
 Ctor is distributed under the BSD 2-Clause License. Ctor is distributed under the BSD 2-Clause License.
 See accompanying file [[http://cgit.ctor.cc/ctor.git/tree/LICENSE|LICENSE]] for details. See accompanying file [[http://cgit.ctor.cc/ctor.git/tree/LICENSE|LICENSE]] for details.
  
-=====Getting started=====+======Getting started======
 If the ctor library is already available as part of your distro skip directly to "How to set up your build configuration". If the ctor library is already available as part of your distro skip directly to "How to set up your build configuration".
  
-====Adding libctor to your project====+=====Adding libctor to your project=====
 Assuming you are working on a git repository: Assuming you are working on a git repository:
 <code> <code>
Line 37: Line 39:
 Then run ''./ctor'' to build it - it will end up in the build subfolder. Then run ''./ctor'' to build it - it will end up in the build subfolder.
  
-====How to set up your build configuration====+=====How to set up your build configuration=====
 Assuming that you have a project with a two C++ source files, ''hello.cc'' and ''world.cc'', and would like to compile them into an application binary (target) with the name ''hello'': Assuming that you have a project with a two C++ source files, ''hello.cc'' and ''world.cc'', and would like to compile them into an application binary (target) with the name ''hello'':
  
 In the root of your project you can create your first ''ctor.cc'' build configuration file: In the root of your project you can create your first ''ctor.cc'' build configuration file:
 <code c++> <code c++>
-#include <libctor.h>+#include <ctor.h>
 namespace namespace
 { {
-BuildConfigurations myConfigs()+ctor::build_configurations myConfigs(const ctor::settings& settings)
 { {
   return   return
Line 52: Line 54:
         .target = "hello",  // output filename         .target = "hello",  // output filename
         .sources = { "hello.cc", "world.cc" }, // list of source files to compile         .sources = { "hello.cc", "world.cc" }, // list of source files to compile
-        // See libctor.h for more options+        // See ctor.h for more options
       }       }
     };     };
Line 64: Line 66:
 Now you just need to compile the ''ctor.cc'' file along with the ''libctor.a'' library: Now you just need to compile the ''ctor.cc'' file along with the ''libctor.a'' library:
 <code> <code>
-g++ ctor.cc -Llibctor/build -lctor -Ilibctor/src -pthread -o ctor+g++ -std=c++20 ctor.cc -Llibctor/build -lctor -Ilibctor/src -pthread -o ctor
 </code> </code>
  
Line 75: Line 77:
  
 Finally, run ''./ctor'' to build your project. Finally, run ''./ctor'' to build your project.
 +
 +======Getting Help======
 +To get help log on to libera.chat on the [[http://kiwiirc.com/nextclient/irc.libera.chat:+6697/#ctor|#ctor]] channel.