mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
689e0228ba
Translations and doc/xz-file-format.txt and doc/lzma-file-format.txt were not touched. COPYING.0BSD was added.
23 lines
740 B
CMake
23 lines
740 B
CMake
#############################################################################
|
|
#
|
|
# remove-ordinals.cmake
|
|
#
|
|
# Removes the ordinal numbers from a DEF file that has been created by
|
|
# GNU ld or LLVM lld option --output-def (when creating a Windows DLL).
|
|
# This should be equivalent: sed 's/ \+@ *[0-9]\+//'
|
|
#
|
|
# Usage:
|
|
#
|
|
# cmake -DINPUT_FILE=infile.def.in \
|
|
# -DOUTPUT_FILE=outfile.def \
|
|
# -P remove-ordinals.cmake
|
|
#
|
|
#############################################################################
|
|
#
|
|
# Author: Lasse Collin
|
|
#
|
|
#############################################################################
|
|
|
|
file(READ "${INPUT_FILE}" STR)
|
|
string(REGEX REPLACE " +@ *[0-9]+" "" STR "${STR}")
|
|
file(WRITE "${OUTPUT_FILE}" "${STR}")
|