Select the Configuration Properties > C/C++ > Command Line property page.Īdd /options:strict to the Additional options: pane. For details, see Set C++ compiler and build properties in Visual Studio. Open the project's Property Pages dialog box. To set this compiler option in Visual Studio It emits warning D9002, ignores the unrecognized option, and continues processing. According to the New and Update Command Options part of the MSDN document, -cf, -CertFile is supported by the -New and -Update command and it applies to All file types. In earlier versions of the compiler, or if /options:strict isn't specified, the compiler doesn't exit on an unrecognized option. According to my knowledge, the command is ok which should not throw a 'Unrecognized command line argument '-CertFile'' error. The /options:strict option is available starting in Visual Studio 2022 version 17.0. The compiler emits error D8043 for any command-line option or argument that isn't recognized. The /options:strict compiler option causes the compiler driver cl.exe to exit with an error code after all command-line options are parsed if another command-line option or argument isn't recognized. watch -x squeue -o "%.18i %.9P %.8j %.8u %.2t %.10M %.6D %R %V %S %Z"Īlias sq='squeue -o "%.18i %.9P %.8j %.8u %.216t %.10M %.The /options:strict compiler option tells the compiler to return an error code if a compiler option isn't recognized. Need to use extra quoting to get the desired effect. Pass command to exec(2) instead of sh -c which reduces the That way, the separate command line arguments stay separate. Tell watch to skip the shell, and to run the command directly. NOTE: You can use set -x and run watch >/dev/null to see the command that the shell actually runs, you'll see there if the quotes actually get passed along to watch. They don't act on the command line when the alias is expanded. The outer quotes just quote the alias when it's defined. It's just that when your alias expands the double-quotes are not quoted. You have two choices:Īdd explicit quotes for the shell that watch starts. So watch ls -l "foo bar" becomes the same as watch ls -l foo bar, and you get a similar problem with squeue. Watch concatenates its command line arguments, joining them with spaces and passes the result as a string to sh -c. I'm sure the solution is some small twist to the other watch question but I don't know what. If I don't use aliases everything is fine. When run with one argument, the argument is treated as a Go-syntax-like. Because the aliased watch strips out quotations: Every 2.0s: squeue -o %.18i %.9P %.8j %.8u %.2t %.10M %.6D %R %V %S %Z Fri Jul 6 12:06:57 2018 The -o flag forces build to write the resulting executable or object to the. I want run watch on a custom slurm squeue command: $alias squeue_personal='squeue -o "%.18i %.9P %.8j %.8u %.216t %.10M %.6D %R %V %S %Z"'īut this still doesn't work. I need to use quotes, which seem to be stripped by an aliased watch. My questions is similar to the watch question here but with a twist.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |