About
These are timings for cloning the [squash][] repository including submodules, running [CMake][] to generate makefiles, and building the project in debug mode.
All toolsets run on the same machine (Core i5, 8 GB, Win10 64):
#!/usr/bin/env python3 | |
# Copyright (c) 2014 Joergen Ibsen | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the | |
# Software is furnished to do so, subject to the following conditions: |
#!/usr/bin/env python3 | |
# Copyright (c) 2014 Joergen Ibsen | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the | |
# Software is furnished to do so, subject to the following conditions: |
#include <stdlib.h> | |
#include <stdio.h> | |
#include "scv.h" | |
struct point { | |
int x; | |
int y; | |
}; |
These are timings for cloning the [squash][] repository including submodules, running [CMake][] to generate makefiles, and building the project in debug mode.
All toolsets run on the same machine (Core i5, 8 GB, Win10 64):
I hereby claim:
To claim this, I am signing this object:
Here are two simple CMake functions that take a list of compiler flags, and append those that do not result in an error when used to the supplied variable.
Depending on which version of CMake you need to support, you might want to
look into the COMPILE_FLAGS
property and target_compile_options()
.
#!/usr/bin/env python3 | |
# Copyright (c) 2018-2022 Joergen Ibsen | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the | |
# Software is furnished to do so, subject to the following conditions: |
/* | |
* Console Color | |
* | |
* Copyright (c) 2005 Joergen Ibsen | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a | |
* copy of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction, including without limitation | |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom the |
;; | |
;; The "worlds smallest" bubble sort (16 bytes) | |
;; | |
;; Copyright (c) 1998 by Joergen Ibsen / Jibz | |
;; All Rights Reserved | |
;; | |
bits 32 | |
section .text |
The C standard only specifies minimum limits for the values of character types and standard integer types. This makes it possible to generate efficient code on diverse architectures, but can pose problematic if your code expects the limits to match your development platform, or if you have to do low-level things.
Before C99, the usual way to solve this was to use typedef to declare synonyms