Reputation: 361
I'm trying to integrate a legacy borland turbo c++ project into jenkins task and I need to be able to compile the project from command line.
Is there any way to get the compiler CLI information from the project so that I could make a batch file that compiles it?
SO: Windows 7
Upvotes: 1
Views: 1710
Reputation: 20878
You can get the commands being invoked by C++ Builder by exporting a makefile for the project.
Run the makefile with borland's make.exe
tool:
make -B -K -n -f"projectMakefileGoesHere"
-B
will traverse all the dependencies ignoring age.-K
will keep any temp response files used during the build.-n
do a dry-run printing the commands that would've been called in an actual build.The link commands will be in the MAKE0xxx.@@@
response file where "x" is a number assigned by make.
For later versions of C++ Builder, the .cbproj
project is actually a msbuild project file. You can use msbuild to print the build commands used for the project. eg.
msbuild "project.cbproj" -p:Configuration=Debug -clp:ShowCommandLine -v:n
Unfortunately, msbuild doesn't have a dry-run option so it'll end up building the project. Another idea is to create a simple logging program that replaces bcc32.exe
compiler and ilink32.exe
linker. With this, you can see exactly what options and switches are being passed to the tools.
Upvotes: 4