Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
a ? b : c

aquawicket aquawicket

💭
a ? b : c
View GitHub Profile
@aquawicket
aquawicket / xml.cpp
Created Feb 21, 2022 — forked from anonymous/xml.cpp
Duktape bindings for TinyXML 2
View xml.cpp
#include <duktape.h>
#include <tinyxml2.h>
using namespace tinyxml2;
// -----------------------------------------------------------------------------
// XmlNode Object structure & utility functions
// -----------------------------------------------------------------------------
#define DUKWIN_XMLNODE_PROTOTYPE "$DukwinXmlNodePrototype"
@aquawicket
aquawicket / clearCache.cmake
Created Dec 23, 2021
Simple CMake function to recursively clear the cache files. (cross platform)
View clearCache.cmake
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()