Add global define for batch Visual Studio build
I want to make a batch build for my solution. But instead of several configurations, each with different defines, I edit those defines manually in a global header file.
So I have a header with strings like:
#define ENABLE_FEATURE_1
//#define ENABLE_FEATURE_2
So in order to build all required configurations, I need to comment/uncomment those lines.
Is it able somehow to pass the /D
option to the build command like in the following?
devenv.exe MyProject.sln /build "Release|Win3开发者_StackOverflow社区2"
You don't need to call devenv to compile your project. Take a look at MSBuild.
精彩评论