# # This file ensures that the wineserver is spawned before running the unit # tests, such that CTest will not attach itself to it. This is an ugly hack # workaround, but what can you do? # set(ENV{WINEPREFIX} "@DCMTK_WINEPREFIX@") set(ENV{DCMDICTPATH} "@DCMDICTPATH@") set(WINE_WINE_PROGRAM "@WINE_WINE_PROGRAM@") # spawn the winserver using 'cmd /C call' -> effectively NOP # spawn it using 'sh', such that this script does not attach itself to it. execute_process(COMMAND sh -c "\"${WINE_WINE_PROGRAM}\" cmd /C call" OUTPUT_FILE "/dev/null" ERROR_FILE "/dev/null" )