Introduction

This wiki page contains information regarding build modernization and consolidation using CMake.

Modifications

Getting Started

1.) For NON-PROPER builds, which includes windows, you will need to obtain CMake 2.8.3 or > for the target platform you are working on. On CSL machines, it is installed in /unsup/cmake. http://www.cmake.org/cmake/resources/software.html For PROPER *nix builds you will need cmake 2.8 or >.

2.) Checkout origin/master

3.) navigate to CONDOR_SRC

4.) UW Folks can type ./configure_uw , while others should use cmake ., on windows run cmake-gui

NOTE(s):

5.) Now you can run make or open the visual studio solution file.

Windows: (2008 instructions)

Prior to building for the 1st time there are some prerequisites that you will need to configure.

  1. Install git. Add it to your PATH.

  2. Install 7-zip. Add it to your PATH.

  3. Install Visual Studio. Add it to your PATH.

  4. Install Perl. Add it to your PATH.

  5. Install the .NET 2.0 redistributable (May not be necessary if already installed. May be installed by default on Vista and later?)

  6. Install the lastest platform SDK and reopen the solution. (Depends on .NET 2.0)

  7. Install WiX 3.0 on your windows machine (Depends on Visual Studio). Add it to your PATH.

  8. Open Tools->Options under "Projects and Solutions" click on VC++ Directories and add the following to the Executable directories
    • $(SolutionDir)\msconfig
    • Move $(PATH) to the bottom as sometimes C:\cygwin\bin is in the $(PATH) which can cause issues with HTCondor's bundled binaries.

  9. Open and build.

Installing

There is now officially an install target and release has been removed.

cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/condor/x.y.z ...
make install

Testing

The code has been restructured so all things test related are bundled under a single target, and all binaries relating to that target set their output to condor_tests.

make tests

Once built you can run all the batch tests as before.

Packaging

Packaging target have already been added simply run:

TBD as this has variants for UW, see VDT.

TODO

see Ticket #779 #1248 #1676 #1783 #1819

Windows Gotchas

SDK corruption of VC setup

Installation of the new Microsoft SDK (6.1 aka Server 2008) can leave an existing VC 9.0 installation with a corrupted setup bat file. After installing the SDK, check the contents of C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat
If you see the lines:

@SET FrameworkDir=Framework32
@SET FrameworkVersion=v2.0.50727
change them to:
@SET FrameworkDir=C:\Windows\Microsoft.NET\Framework
@SET FrameworkVersion=v2.0.50727
@SET Framework35Version=v3.5

Also, a portion of the PATH variable may have an incorrect entry which can lead to problems in the CMD interpreter. If in the same file you see a PATH entry like:

%FrameworkDir%\%Framework35Version%\Microsoft .NET Framework 3.5 (Pre-Release Version);
change it to point to the correct version like:
%FrameworkDir%\%Framework35Version%\Microsoft .NET Framework 3.5 SP1;

Environment variable expansion

The new SetEnv.cmd shipped in the 6.1 SDK requires that both command extensions and environment variable expansion be turned on. Either use the "CMD Shell" shortcut installed with the Windows SDK or ensure that CMD is launch with the /V:ON and /E:ON parameters. For example:
CMD /V:ON /E:ON

Links

CMake Official Documentation

Google Code Search for open source examples