Commit ee687771 authored by Bernard Spil's avatar Bernard Spil Committed by Sergei Golubchik

Use /bin/sh

Remove Linuxism. 

Works fine with a POSIX-compat shell
parent e69c6e81
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "") set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/runcat.sh" "#!/bin/bash file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/runcat.sh" "#!/bin/sh
out=$1; shift out=$1; shift
exec \"$@\" >$out") exec \"$@\" >$out")
...@@ -8,7 +8,7 @@ add_executable(make_tdb make_tdb.cc) ...@@ -8,7 +8,7 @@ add_executable(make_tdb make_tdb.cc)
set_property(TARGET make_tdb APPEND PROPERTY COMPILE_DEFINITIONS _GNU_SOURCE) set_property(TARGET make_tdb APPEND PROPERTY COMPILE_DEFINITIONS _GNU_SOURCE)
add_custom_command( add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/db.h" OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/db.h"
COMMAND bash runcat.sh "${CMAKE_CURRENT_BINARY_DIR}/db.h" $<TARGET_FILE:make_tdb> COMMAND sh runcat.sh "${CMAKE_CURRENT_BINARY_DIR}/db.h" $<TARGET_FILE:make_tdb>
DEPENDS make_tdb) DEPENDS make_tdb)
add_custom_target(install_tdb_h DEPENDS add_custom_target(install_tdb_h DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/db.h") "${CMAKE_CURRENT_BINARY_DIR}/db.h")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment