CMake

>CMake

Attached: frog_02.png (744x804, 167K)

Other urls found in this thread:

github.com/premake/premake-core
gitlab.com/DEC05EBA/sibs/raw/master/examples/hello_lua/project.conf
twitter.com/NSFWRedditGif

Attached: 1565024538730.webm (1280x720, 2.96M)

that last frame

Attached: 1417647178575.jpg (366x380, 32K)

>C++

Attached: 1541193045848.jpg (1024x595, 74K)

based
fuck this garbage, even a hello world config is unreadable

but is it good for cross-platform purpose?

it's not good for anything, sadly there's not altenrative

>sadly there's not altenrative
why? is it so hard to write one?

stupid avatar usage

stupid redditor

>Meson

Attached: 9D6669C76F0941A6AC7ADAE84D0EAF20.png (500x522, 117K)

>webdev

>avatar
go back

just write your own make file

>Make

Attached: 1565029761717.png (960x659, 205K)

pls stop using CMake, use Premake instead it's actually good.

also use Conan instead of manually linking like pajeets, thanks.

Attached: 1561726213824.png (128x128, 23K)

there is:
github.com/premake/premake-core

meson is even more retarded than cmake. they repeat it's mistakes and add some new ones.

this piece of shit software is the reason I dropped programming when I tried to learn it for the first time
I just couldn't get the damn thing to work no matter what and every tutorial recommended it

set_target_properties(waifu PROPERTIES
HEIGHT 130
AGE 13
SEX f
STATUS virgin
)

There's a 100 build systems out there, look at firefox and chromium

Why though. It's way more readable than cmake.

yeah but the people behind it are legit retarded.
first of all it has its own DSL, which has no positive and only negative of forcing devs to learn more useless shit (Premake uses Lua).
and they got retarded ideas like "turing cometeness is bad!" and forcing the developer to manually compile file lists instead of globbing.

just use Premake it's actually made by competent people.

>no globbing
Don't care at all. It takes like 1 minute more type out your shit.

>no turing completeness
This is a good thing. It's just a build system. You don't need that shit.

>dsl
This I agree is silly. They should have just used some existing language.

Too old

>Don't care at all. It takes like 1 minute more type out your shit.

>add new file
>build doesnt work
>waste time debugging BS errors like unknown symbols until you realize you forgot to manually add it.

>rename/move file
>coworker comes to you complaining your commit breaks the code

it's 1 minute to fix but you'll spend tons of time dealing with bullshit because this approach is brittle and braindead.

and it's just as braindead to say lack of turing completeness is a good thing.

Why you niggers have to be contrarian on everything?

CMake has to be one of the biggest pieces of shit I've ever used. The worst part is that it's somehow the fucking standard. Like the other user said even trivial projects are a fucking pain in the ass to decipher, let alone a non-trivial large project is just a complete mess. Fuck CMake and the trannies responsible for it.

i just have 20k line programs so i don't know about the problems people talk

-- premake5.lua
workspace "HelloWorld"
configurations { "Debug", "Release" }

project "HelloWorld"
kind "ConsoleApp"
language "C"
targetdir "bin/%{cfg.buildcfg}"

files { "**.h", "**.c" }

filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"

filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"

as other user said they are just contrarians

>have to learn another programming language to build anything larger than fizzbuzz
worst part of C/C++ desu, at least Java's overly huge and complex build tools for the most part just use XML configs or something

> go build -o app

Attached: unnamed.png (369x399, 60K)

if learning another language is a hard task for you you're not a good programmer

>frogpost

Attached: żegnamy się.gif (200x200, 1.16M)

I was using meson but i didn't like how they handle dependencies, so i made my own build system. It automatically finds all source files in your project and you can add dependencies in a few different ways:
1. By adding them as sub directories (i often use git submodules for that).
2. As package dependencies by adding them into the config file. Dependencies are automatically downloaded from the internet for the version you specify or the package you have installed on your system is used if the version matches,
3. Add the repository and commit id to the config file, and it will automatically be pulled with git.

This is what an example config file looks like: gitlab.com/DEC05EBA/sibs/raw/master/examples/hello_lua/project.conf
it will build all the source files in your project and add lua dependency if you have it installed on your system, otherwise it will download it from gitlab and build from source or use precompiled binaries.

It also provides ways and wip to build standalone binaries on linux without any required system dependencies, so you can share binaries without requiring users to have correct dependencies.

I love cargo. That's all.

In other words; it's cargo but for c and c++

As opposed to what? Autotools?

Get real.

I'm not sure what you mean by "unknown symbols". Debugging symbols are on by default. Also how often do you fucking rename files to where spending 1 second updating your build file is a problem? Name your shit correctly.

>and it's just as braindead to say lack of turing completeness is a good thing.
Why on earth do you need this for your build system. This one of the shitty things about cmake that meson thankfully avoided.

Alright so what should I use for a small to medium-sized one-man project? (Small relative to actual projects, not small as in an afternoon or weekend project)

yeah I remember using it for OpenGL and I keep getting some weird errors, then I just installed CodeBlocks, choose OpenGL when creating a project and it just werked

It depends if you have complex (as in, complex to build) dependencies. The size of the project does not matter too much.
For anything more than a handful of dependencies, I'd use conan + cmake.

By unknown symbols he means when you forget to add source files to the list of sources files in meson. You include the header files and try and use functions but the linker will complain about missing symbols

I don't expect to use a shitton of dependencies. I also would rather not use CMake, in large part because half the point of this project is to learn new things and I've already used CMake in the past, so I wanna try something new.

What the fuck is up with C/C++ people and not understanding 21st century techniques for building deploying code? I would rather write JS using npm than deal with the brainlet shit C++ devs use.

I like the codeblocks build system. Just codeblocks --target Release --build file.cbp and works on any platform supported.

Then just use plain make + pkg-config. Unless you want to go cross platform, in which case you're back to conan + cmake.

why is adding libraries and linking them so fucking hard?
why isn't it just two lines of code
>#inculde
>library location C:\Library
?
wouldn't be that enough to execute a program? please explain this shit to a beginner

>library.h depends of library2.h
>Error, library2.h must be >1.28 (you have 1.27)

>cmake is responsible of why I stopped learning programming
oh, yeah... it's definitely cmake's fault and not you being too ignorant and not admitting that you're too lazy.

I do want it to be cross-platform, though, and I will also need to configurably produce several binaries. While I don't doubt this is possible in make, it sounds a bit more than trivial, and I don't think "wizard at make" is a more desirable skill than "knows how to use modern build systems", so I'd rather put effort into the latter.
If you think everything except cmake is worthless then please at least give an argument, else your advice is literally useless since I already said I want to learn something that's not cmake.

But it pretty much is. The main issues stem from dependency chains, doubly so when you want/need to compile a particular library.

>GNU Make

Attached: b&r.jpg (1080x1246, 100K)

>#include
>library2 location C:\Library2
?

Cmake is a pain to use sometimes but it werks.

It is that easy on non-windows platforms.
If you use an IDE like netbeans, you can just press project settings and add the dependency from a list of installed libraries on your system, or if you wish to do it without an ide, you can do: pkg-config --cflags --libs pkg_name and it will automatically add all the flags needed and the dependencies for the library for your project.
For example, building your project with gtk:
gcc main.c `pkg-config --cflags --libs gtk+-3.0`

My point is that writing cmake is an exercise in pain, but most libraries will use it, so it's the way to go. Unless all your dependencies already use an alternative, you're SOL.
That's also why my suggestion is to use conan for dependency management (as it will reduce the actual cmake you'll need to write) + cmake.

this build system also works with cmake dependencies, so you dont need to convert existing cmake projects to this build system.

me no like cmake
make headhole hurt

>this thread
CMake is fine. It could be worse, I take it you kids have never had to use autotools.

neck yourself boomer
just because it sucks less now doesn't mean it's not a complete piece of shit and everyone responsible for it shouldn;t be dead

I still don't see a better alternative

Holy shit that was awesome

just use conan package manager

>not using QMake
I love Qt.

Oh fuck no.
CMake is way better than Meson.
Meson is developed by autists who want to do everything their way.
Their language sucks anyway, there is more syntactic noise than cmake.

can't get clearer than:
set(variable /path/to/something)


CMake is super powerful and can do almost anything you want. It has really good IDE support.

>21st century techniques for building deploying code

Let's ignore the fact that C++ developers deploy code in stock exchanges, on desktops, in mobile platforms, on Mars, in video game consoles, etc.

Meanwhile Node fags have a bitcoin miner or SSH key stealing malware every week.

No, the tool is just shit.

kill yourself pedo

Nothing he said is wrong though. Just because people are making productive products using c++ does not mean that their development workflow is modern or optimal, let alone correct.