Skip to content

Instantly share code, notes, and snippets.

View aquawicket's full-sized avatar
💭
a ? b : c

aquawicket aquawicket

💭
a ? b : c
View GitHub Profile
@aquawicket
aquawicket / xml.cpp
Created February 21, 2022 11:54 — forked from anonymous/xml.cpp
Duktape bindings for TinyXML 2
#include <duktape.h>
#include <tinyxml2.h>
using namespace tinyxml2;
// -----------------------------------------------------------------------------
// XmlNode Object structure & utility functions
// -----------------------------------------------------------------------------
#define DUKWIN_XMLNODE_PROTOTYPE "$DukwinXmlNodePrototype"
@aquawicket
aquawicket / clearCache.cmake
Created December 23, 2021 19:36
Simple CMake function to recursively clear the cache files. (cross platform)
function(DELETE_CACHE)
if(CMAKE_HOST_WIN32)
execute_process(COMMAND cmd /c for /r %%i in (CMakeCache.*) do del "%%i" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
execute_process(COMMAND cmd /c for /d /r %%i in (*CMakeFiles*) do rd /s /q "%%i" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
execute_process(COMMAND find . -name "CMakeCache.*" -delete WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
execute_process(COMMAND "rm -rf `find . -type d -name CMakeFiles`" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()
endfunction()