0

使用 MSVC 编译器,我可以从命令提示符处执行此操作

cl /c /Foout1 dispatch_example.cpp
cl /c /arch:AVX /Foout2 dispatch_example.cpp
cl instrset_detect.cpp out1.obj out2.obj

如何使 Visual Studio 项目文件执行此操作?我的意思是,从命令提示符我可以做到

msbuild foo.vcxproj

它构建了所有内容,以便我可以从命令提示符构建项目。

4

1 回答 1

0

查看您输入的在线说明 应该可以工作。

C:\Users\Mikhail\Documents\Visual Studio 2012\Projects\openMPProducerConsumer\openMPProducerConsumer>notepad fun.out

Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18034]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 5/13/2013 6:34:08 PM.
Project "C:\Users\Mikhail\Documents\Visual Studio 2012\Projects\openMPProducerConsumer\openMPProducerConsumer\openMPProducerConsumer.vcxproj" on node 1 (default targets).
InitializeBuildStatus:
  Creating "x64\Debug\openMPProducerConsumer.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  All outputs are up-to-date.
Link:
  All outputs are up-to-date.
  openMPProducerConsumer.vcxproj -> C:\Users\Mikhail\Documents\Visual Studio 2012\Projects\openMPProducerConsumer\openMPProducerConsumer\x64\Debug\openMPProducerConsumer.exe
FinalizeBuildStatus:
  Deleting file "x64\Debug\openMPProducerConsumer.unsuccessfulbuild".
  Touching "x64\Debug\openMPProducerConsumer.lastbuildstate".
Done Building Project "C:\Users\Mikhail\Documents\Visual Studio 2012\Projects\openMPProducerConsumer\openMPProducerConsumer\openMPProducerConsumer.vcxproj" (default targets).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.36
于 2013-05-13T23:35:39.410 回答