Skip to content

Instantly share code, notes, and snippets.

/**
* @file timer_functions.c
*
* @brief Functions for working with timers.
*/
#include "timer.h"
/**
* @brief Start a timer with the specified duration.
@lchagnoleau
lchagnoleau / CMakeLists.txt
Created April 7, 2023 06:12
Print all cmake variables
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
@lchagnoleau
lchagnoleau / CMakeLists.txt
Created May 23, 2024 11:27
CMake multiple target by list
cmake_minimum_required(VERSION 3.21)
project(cmake_test LANGUAGES C)
set(target "t1" "t2" "t3")
foreach(t ${target})
set(MESSAGE_TEXT "Hello, ${t}")
add_executable(${t} main.c)
@lchagnoleau
lchagnoleau / foo.c
Last active June 7, 2024 12:38
How to use `wrap` option in gcc
#include "foo.h"
#include <stdio.h>
void foo()
{
printf("foo\n");
}