We now no longer need sed in either CMake or Visual Studio, removing it as a
build dependency on Windows.
- remove regex usage #1919
- RxSpencer is no longer a dependency on Windows
- gvmap.sh is compatible with POSIX shells in addition to ksh
+- sed is no longer a build dependency on Windows
### Fixed
- Fix gvpr -? to actually print usage and exit non-zero
add_custom_command(
OUTPUT exparse.c
MAIN_DEPENDENCY y.tab.c
- COMMAND sed -e "s/fprintf/sfprintf/g" -e "s/FILE/Sfio_t/g" -e "s/stderr/sfstderr/g" ${CMAKE_CURRENT_BINARY_DIR}/y.tab.c > exparse.c
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -P ${CMAKE_CURRENT_SOURCE_DIR}/exparse-replacements.cmake
)
if (WIN32)
--- /dev/null
+# replacement steps corresponding to the sed commands in Makefile.am
+FILE(READ y.tab.c data0)
+STRING(REPLACE "fprintf" "sfprintf" data1 "${data0}")
+STRING(REPLACE "FILE" "Sfio_t" data2 "${data1}")
+STRING(REPLACE "stderr" "sfstderr" data3 "${data2}")
+FILE(WRITE exparse.c "${data3}")