I'm trying to configure CMake to create MSVC (2010) for our project, and I need to configure the projects so that they use our specific build system, rather than compiled using the default command line.
Here is a project file similar to VS2008 (which we generate using another script that I would like to get away from):
<Tool Name="VCNMakeTool" BuildCommandLine="../bam.bat -j %%NUMBER_OF_PROCESSORS%%" ReBuildCommandLine="../bam.bat -j %%NUMBER_OF_PROCESSORS%% -c && ../bam.bat -j %%NUMBER_OF_PROCESSORS%%" CleanCommandLine="../bam.bat -j %%NUMBER_OF_PROCESSORS%% -c " Output="..\..\..\common\win32\container.exe" PreprocessorDefinitions="" IncludeSearchPath="" ForcedIncludes="" AssemblySearchPath="" ForcedUsingAssemblies="" CompileAsManaged="" />
These are basically three CommandLine options that I would like to specify from my cmake configuration.
I found the build_command command in the documentation, but from the description, which sounds like it looks like the opposite of what I want, i.e. writes the command line that it will generate a variable instead of taking the line and setting the command line for it.
Something a bit related to cross-compiling in CMake, but I'm sure this is a good way to do this.
Basically, I just want VS to run a batch file when I do the build, and then analyze the results to get good error messages, etc.
source share