I need to generate a message whose content I wish to pass at compile time using the option -Dname="string".
It seems impossible to pass a string having blanks, whatever combination of single and/or double quotes I use.
The documentation simply states ( http://software.intel.com/sites/products/documentation/doclib/stdxe/2013... ) :
value : Is an optional integer or an optional character string delimited by double quotes; for example, Dname=string.
without any advice about the string content.
Here is a simple example.
$ cat testfppi.f
# NB : here the blanks between double and single quotes are for readability only, I did not use them actually.
$ ifort -V -fpp -E -DOPERATING_SYSTEM=" 'Red Hat Linux' " testfppi.f
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 6, Version 13.0.0.079 Build 20120731
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
ifort: error #10236: File not found: 'Hat'
ifort: error #10236: File not found: 'Linux'
# 1 "testfppi.f"
I also tried escaping the blanks by backslashes, without success.
Is that the intended way of working for "-D" ? Is there any way to have blanks in such a string ?
Thanks in advance.