feat(EditorConfig): Add .editorconfig files

This commit is contained in:
Jiří Štefka 2023-12-10 01:25:53 +01:00
parent 1f8dce3a86
commit 96477dfba3
Signed by: jiriks74
GPG key ID: 1D5E30D3DB2264DE
12 changed files with 400 additions and 0 deletions

17
01/src/CMakeLists.txt Normal file
View file

@ -0,0 +1,17 @@
# Make an explicit list of all source files in `CMakeDemo_SRC`. This is important
# because CMake is not a build system: it is a build system generator. Suppose
# you add a file foo.cpp to src/ after running cmake .. . If you set
# `CMakeDemo_SRC` with `file(GLOB ... )`, this is not passed to the makefile;
# the makefile doesn't know that foo.cpp exists and will not re-run cmake. Your
# collaborator's builds will fail and it will be unclear why. Whether you use
# file(GLOB ...) or not, you will need to re-run cmake, but with an explicit
# file list, you know beforehand why your code isn't compiling.
set(SRC
main.c
)
# Form the full path to the source files...
PREPEND(SRC)
# ... and pass the variable to the parent scope.
set(SRC ${SRC} PARENT_SCOPE)

25
01/src/main.c Normal file
View file

@ -0,0 +1,25 @@
/**
* Copyright [2023] Jiří Štefka <jiriks74>
* Project: AdventOfCode
* @file main.c
* @brief Main entry point
* @author jiriks74
*/
#include <stdio.h>
/**
* @brief Main entry point
* @param argc Number of command-line arguments.
* @param argv Array of command-line arguments.
*/
#ifndef TESTING
int main(int argc, char *argv[])
#endif
#ifdef TESTING
int main_test(int argc, char *argv[])
#endif
{
printf("Hello world!\n");
return 0;
}