How do I script a complex link in visual studio (FIPS / Static Link Lib / VS.2008)
Question
What's the right way to build a complex fips link into the Visual Studio vcproj projects while continuing to allow developers to arrange libraries via the properties GUI?
Situation
I'm using VS 2008 and have a bunch of projects that use openssl statically linked. Thus far the link has been simple, but now I'm switching to a FIPS signed library and the process is like this:
- compile source to obj
- link to exe
- run exe which dumps a sha signature to stdout which is captured for the next step
- recompile pre-main setting define to the signature (which we pulled out using a regex)
- re-link application
FIPs provides some nmake and perl scripts to help with process, but my team is used to working in Visual studio and I'd like to keep their workflow as similar as possible.
Options
- custom link step using batch/perl/nmake files
- msbuild
- macros
- other
I tried using batch files and perl files to orchestrate the link, but I'm having difficulty capturing all of the link settings and libraries. I have begun to look at msbuild, but I'm unclear how it reacts with a Vis开发者_开发知识库ualStudioProject for c++.
My problem is the transfer of data from the VisualStudio project to the custom link step. I guess I could force the link to dump the data and then parse it and pull it into the perl or make script. The variables available inside the IDE do not seem to hold all the data I need.
Please let me know what approaches you have tried for this kind of thing and what gotchas are out there. Thanks for the help
I think I'm approaching this in too small a fashion. Visual studio projects can be an artifact produced instead of the central locus of project information. I could use scons, cmake, nant, nmak, maven or some of these technology to describe my build process and generate the IDE environment as an artifact.
My goals are thus:
- support TDD with quick and simple experience from source change through compile to test
- support the familiar IDE experience that the developers
- perform the complex link in an easily understood and maintainable way
None of these say that the canonical location of project information needs to be the vcprof file.
I recall reading about this pattern for C++ (it's what I use for java already). I think I'll take a look at some of these.
Anyone have any experience with the slingshot from declaritive project file or script file to IDE environment?
精彩评论