Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/cJSON/blob/master/library_config/uninstall.cmake # cJSON [Ported from github.com/DaveGamble/cJSON] Fix: heap-use-after-free in merge_patch when patch is subtree of target (#1065) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `cJSON / library_config / uninstall.cmake` 27 lines ยท 726 bytes Raw Blame History 1 cmake_minimum_required(VERSION 3.5) 2 3 set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt") 4 5 if(NOT EXISTS ${MANIFEST}) 6 message(FATAL_ERROR "Cannot find install mainfest: ${MANIFEST}") 7 endif() 8 9 file(STRINGS ${MANIFEST} files) 10 foreach(file ${files}) 11 if(EXISTS ${file} OR IS_SYMLINK ${file}) 12 message(STATUS "Removing: ${file}") 13 14 execute_process(COMMAND rm -f ${file} 15 RESULT_VARIABLE result 16 OUTPUT_QUIET 17 ERROR_VARIABLE stderr 18 ERROR_STRIP_TRAILING_WHITESPACE 19 ) 20 21 if(NOT ${result} EQUAL 0) 22 message(FATAL_ERROR "${stderr}") 23 endif() 24 else() 25 message(STATUS "Does-not-exist: ${file}") 26 endif() 27 endforeach(file)