summaryrefslogtreecommitdiff
path: root/Templates
diff options
context:
space:
mode:
Diffstat (limited to 'Templates')
-rw-r--r--Templates/AppleInfo.plist36
-rw-r--r--Templates/CMakeVSMacros1.vsmacrosbin0 -> 88064 bytes
-rw-r--r--Templates/CMakeVSMacros2.vsmacrosbin0 -> 63488 bytes
-rw-r--r--Templates/CMakeVisualStudio6Configurations.cmake3
-rw-r--r--Templates/CPack.GenericDescription.txt5
-rw-r--r--Templates/CPack.GenericLicense.txt5
-rw-r--r--Templates/CPack.GenericWelcome.txt1
-rw-r--r--Templates/CPackConfig.cmake.in12
-rw-r--r--Templates/CTestScript.cmake.in33
-rw-r--r--Templates/DLLFooter.dsptemplate4
-rw-r--r--Templates/DLLHeader.dsptemplate192
-rw-r--r--Templates/EXEFooter.dsptemplate4
-rw-r--r--Templates/EXEHeader.dsptemplate183
-rw-r--r--Templates/EXEWinHeader.dsptemplate187
-rw-r--r--Templates/TestDriver.cxx.in155
-rw-r--r--Templates/UtilityFooter.dsptemplate2
-rw-r--r--Templates/UtilityHeader.dsptemplate95
-rwxr-xr-xTemplates/cygwin-package.sh.in103
-rw-r--r--Templates/staticLibFooter.dsptemplate4
-rw-r--r--Templates/staticLibHeader.dsptemplate173
20 files changed, 1197 insertions, 0 deletions
diff --git a/Templates/AppleInfo.plist b/Templates/AppleInfo.plist
new file mode 100644
index 000000000..1f68ccf92
--- /dev/null
+++ b/Templates/AppleInfo.plist
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${APPLE_GUI_EXECUTABLE}</string>
+ <key>CFBundleGetInfoString</key>
+ <string>${APPLE_GUI_INFO_STRING}</string>
+ <key>CFBundleIconFile</key>
+ <string>${APPLE_GUI_ICON}</string>
+ <key>CFBundleIdentifier</key>
+ <string>${APPLE_GUI_IDENTIFIER}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleLongVersionString</key>
+ <string>${APPLE_GUI_LONG_VERSION_STRING}</string>
+ <key>CFBundleName</key>
+ <string>${APPLE_GUI_BUNDLE_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${APPLE_GUI_SHORT_VERSION_STRING}</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>${APPLE_GUI_BUNDLE_VERSION}</string>
+ <key>CSResourcesFileMapped</key>
+ <true/>
+ <key>LSRequiresCarbon</key>
+ <true/>
+ <key>NSHumanReadableCopyright</key>
+ <string>${APPLE_GUI_COPYRIGHT}</string>
+</dict>
+</plist>
diff --git a/Templates/CMakeVSMacros1.vsmacros b/Templates/CMakeVSMacros1.vsmacros
new file mode 100644
index 000000000..60487d91c
--- /dev/null
+++ b/Templates/CMakeVSMacros1.vsmacros
Binary files differ
diff --git a/Templates/CMakeVSMacros2.vsmacros b/Templates/CMakeVSMacros2.vsmacros
new file mode 100644
index 000000000..5ba27991a
--- /dev/null
+++ b/Templates/CMakeVSMacros2.vsmacros
Binary files differ
diff --git a/Templates/CMakeVisualStudio6Configurations.cmake b/Templates/CMakeVisualStudio6Configurations.cmake
new file mode 100644
index 000000000..a9db2eeba
--- /dev/null
+++ b/Templates/CMakeVisualStudio6Configurations.cmake
@@ -0,0 +1,3 @@
+# When the dll templates are changed, this list should be
+# updated with the list of possible configurations.
+SET(CMAKE_CONFIGURATION_TYPES Debug Release MinSizeRel RelWithDebInfo)
diff --git a/Templates/CPack.GenericDescription.txt b/Templates/CPack.GenericDescription.txt
new file mode 100644
index 000000000..9ca1802ad
--- /dev/null
+++ b/Templates/CPack.GenericDescription.txt
@@ -0,0 +1,5 @@
+DESCRIPTION
+===========
+
+This is an installer created using CPack (http://www.cmake.org). No additional installation instructions provided.
+
diff --git a/Templates/CPack.GenericLicense.txt b/Templates/CPack.GenericLicense.txt
new file mode 100644
index 000000000..c211bb370
--- /dev/null
+++ b/Templates/CPack.GenericLicense.txt
@@ -0,0 +1,5 @@
+LICENSE
+=======
+
+This is an installer created using CPack (http://www.cmake.org). No license provided.
+
diff --git a/Templates/CPack.GenericWelcome.txt b/Templates/CPack.GenericWelcome.txt
new file mode 100644
index 000000000..5330087b1
--- /dev/null
+++ b/Templates/CPack.GenericWelcome.txt
@@ -0,0 +1 @@
+Welcome to installation. This program will guide you through the installation of this software.
diff --git a/Templates/CPackConfig.cmake.in b/Templates/CPackConfig.cmake.in
new file mode 100644
index 000000000..79b8d93ae
--- /dev/null
+++ b/Templates/CPackConfig.cmake.in
@@ -0,0 +1,12 @@
+# This file will be configured to contain variables for CPack. These variables
+# should be set in the CMake list file of the project before CPack module is
+# included. The list of available CPACK_xxx variables and their associated
+# documentation may be obtained using
+# cpack --help-variable-list
+#
+# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME)
+# and some are specific to a generator
+# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables
+# usually begin with CPACK_<GENNAME>_xxxx.
+
+@_CPACK_OTHER_VARIABLES_@
diff --git a/Templates/CTestScript.cmake.in b/Templates/CTestScript.cmake.in
new file mode 100644
index 000000000..63bd26f47
--- /dev/null
+++ b/Templates/CTestScript.cmake.in
@@ -0,0 +1,33 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
+
+# This is a template for the CTest script for this system
+
+SET(CTEST_SITE "@SITE@")
+SET(CTEST_BUILD_NAME "@BUILDNAME@")
+
+# ---
+SET(CTEST_SOURCE_DIRECTORY "@CMAKE_SOURCE_DIR@")
+SET(CTEST_BINARY_DIRECTORY "@CMAKE_BINARY_DIR@")
+SET(CTEST_UPDATE_COMMAND "@UPDATE_COMMAND@")
+SET(CTEST_UPDATE_OPTIONS "@UPDATE_OPTIONS@")
+SET(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
+SET(CTEST_BUILD_CONFIGURATION "Release")
+#SET(CTEST_MEMORYCHECK_COMMAND "@MEMORYCHECK_COMMAND@")
+#SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "@MEMORYCHECK_SUPPRESSIONS_FILE@")
+#SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS "@MEMORYCHECK_COMMAND_OPTIONS@")
+#SET(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
+SET(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
+
+#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
+
+SET(CTEST_DROP_METHOD "@DROP_METHOD@")
+
+CTEST_START(Experimental TRACK Weekly)
+CTEST_UPDATE(SOURCE "${CTEST_SOURCE_DIRECTORY}")
+CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}")
+CTEST_READ_CUSTOM_FILES("${CTEST_BINARY_DIRECTORY}")
+CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
+CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}")
+#CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}")
+#CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}")
+CTEST_SUBMIT()
diff --git a/Templates/DLLFooter.dsptemplate b/Templates/DLLFooter.dsptemplate
new file mode 100644
index 000000000..0d0682a7b
--- /dev/null
+++ b/Templates/DLLFooter.dsptemplate
@@ -0,0 +1,4 @@
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Templates/DLLHeader.dsptemplate b/Templates/DLLHeader.dsptemplate
new file mode 100644
index 000000000..c752fdbf4
--- /dev/null
+++ b/Templates/DLLHeader.dsptemplate
@@ -0,0 +1,192 @@
+# Microsoft Developer Studio Project File - Name="OUTPUT_LIBNAME" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=OUTPUT_LIBNAME - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "OUTPUT_LIBNAME - Win32 MinSizeRel" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "OUTPUT_LIBNAME - Win32 RelWithDebInfo" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# ITK DSP Header file
+# This file is read by the build system of itk, and is used as the top part of
+# a microsoft project dsp header file
+# IF this is in a dsp file, then it is not the header, but has
+# already been used, so do not edit here...
+
+# variables to REPLACE
+#
+# BUILD_INCLUDES == include path
+# EXTRA_DEFINES == compiler defines
+# OUTPUT_DIRECTORY == override in output directory
+# OUTPUT_LIBNAME == name of output library
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_RELEASE"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" OUTPUT_LIBNAME_EXPORTS /FD /c
+# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_RELEASE
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_RELEASE
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /dll /machine:I386
+# ADD LINK32 /nologo /dll TARGET_VERSION_FLAG /machine:I386 /out:"OUTPUT_DIRECTORY_RELEASE/OUTPUT_NAME_RELEASE" TARGET_IMPLIB_FLAG_RELEASE
+CM_MULTILINE_OPTIONS_RELEASE
+
+CMAKE_CUSTOM_RULE_CODE_RELEASE
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "OUTPUT_DIRECTORY_DEBUG"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" OUTPUT_LIBNAME_EXPORTS /FD /c
+# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_DEBUG
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "_DEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_DEBUG
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 /nologo /dll TARGET_VERSION_FLAG /debug /machine:I386 /out:"OUTPUT_DIRECTORY_DEBUG/OUTPUT_NAME_DEBUG" /pdbtype:sept TARGET_IMPLIB_FLAG_DEBUG
+CM_MULTILINE_OPTIONS_DEBUG
+
+CMAKE_CUSTOM_RULE_CODE_DEBUG
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "MinSizeRel"
+# PROP BASE Intermediate_Dir "MinSizeRel"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_MINSIZEREL"
+# PROP Intermediate_Dir "MinSizeRel"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c OUTPUT_LIBNAME_EXPORTS
+# SUBTRACT BASE CPP /YX
+# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /dll /machine:I386
+# ADD LINK32 /nologo /dll TARGET_VERSION_FLAG /machine:I386 /out:"OUTPUT_DIRECTORY_MINSIZEREL/OUTPUT_NAME_MINSIZEREL" TARGET_IMPLIB_FLAG_MINSIZEREL
+CM_MULTILINE_OPTIONS_MINSIZEREL
+
+CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "RelWithDebInfo"
+# PROP BASE Intermediate_Dir "RelWithDebInfo"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_RELWITHDEBINFO"
+# PROP Intermediate_Dir "RelWithDebInfo"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" OUTPUT_LIBNAME_EXPORTS /FD /c
+# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /dll /machine:I386 /pdbtype:sept
+# ADD LINK32 /nologo /dll TARGET_VERSION_FLAG /debug /machine:I386 /pdbtype:sept /out:"OUTPUT_DIRECTORY_RELWITHDEBINFO/OUTPUT_NAME_RELWITHDEBINFO" TARGET_IMPLIB_FLAG_RELWITHDEBINFO
+CM_MULTILINE_OPTIONS_RELWITHDEBINFO
+
+CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO
+
+!ENDIF
+
+# Begin Target
+
+# Name "OUTPUT_LIBNAME - Win32 Release"
+# Name "OUTPUT_LIBNAME - Win32 Debug"
+# Name "OUTPUT_LIBNAME - Win32 MinSizeRel"
+# Name "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
diff --git a/Templates/EXEFooter.dsptemplate b/Templates/EXEFooter.dsptemplate
new file mode 100644
index 000000000..0d0682a7b
--- /dev/null
+++ b/Templates/EXEFooter.dsptemplate
@@ -0,0 +1,4 @@
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Templates/EXEHeader.dsptemplate b/Templates/EXEHeader.dsptemplate
new file mode 100644
index 000000000..f48eaccbc
--- /dev/null
+++ b/Templates/EXEHeader.dsptemplate
@@ -0,0 +1,183 @@
+# Microsoft Developer Studio Project File - Name="pcbuilder" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# CM DSP Header file
+# This file is read by the build system of cm, and is used as the top part of
+# a microsoft project dsp header file
+# IF this is in a dsp file, then it is not the header, but has
+# already been used, so do not edit here...
+
+# variables to REPLACE
+#
+# BUILD_INCLUDES == include path
+# OUTPUT_DIRECTORY == override in output directory
+# EXTRA_DEFINES == compiler defines
+# OUTPUT_LIBNAME == name of output library
+# CM_LIBRARIES == libraries linked in
+# TARGTYPE "Win32 (x86) Application" 0x0103
+
+CFG=OUTPUT_LIBNAME - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "OUTPUT_LIBNAME - Win32 MinSizeRel" (based on "Win32 (x86) Application")
+!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "OUTPUT_LIBNAME - Win32 RelWithDebInfo" (based on "Win32 (x86) Application")
+!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_RELEASE"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_RELEASE
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_RELEASE
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 /IGNORE:4089
+# ADD LINK32 /nologo /subsystem:console /machine:I386 /IGNORE:4089 TARGET_VERSION_FLAG
+# ADD LINK32 /out:"OUTPUT_DIRECTORY_RELEASE\OUTPUT_NAME_RELEASE" TARGET_IMPLIB_FLAG_RELEASE
+CM_MULTILINE_OPTIONS_RELEASE
+
+CMAKE_CUSTOM_RULE_CODE_RELEASE
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "OUTPUT_DIRECTORY_DEBUG"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
+# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_DEBUG
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "_DEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_DEBUG
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /IGNORE:4089
+# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /IGNORE:4089 TARGET_VERSION_FLAG
+# ADD LINK32 /out:"OUTPUT_DIRECTORY_DEBUG\OUTPUT_NAME_DEBUG" TARGET_IMPLIB_FLAG_DEBUG
+CM_MULTILINE_OPTIONS_DEBUG
+
+CMAKE_CUSTOM_RULE_CODE_DEBUG
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel"
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "MinSizeRel"
+# PROP BASE Intermediate_Dir "MinSizeRel"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_MINSIZEREL"
+# PROP Intermediate_Dir "MinSizeRel"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
+# ADD CPP /nologo /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_CONSOLE" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 /IGNORE:4089
+# ADD LINK32 /nologo /subsystem:console /machine:I386 /IGNORE:4089 TARGET_VERSION_FLAG
+# ADD LINK32 /out:"OUTPUT_DIRECTORY_MINSIZEREL\OUTPUT_NAME_MINSIZEREL" TARGET_IMPLIB_FLAG_MINSIZEREL
+CM_MULTILINE_OPTIONS_MINSIZEREL
+
+CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "RelWithDebInfo"
+# PROP BASE Intermediate_Dir "RelWithDebInfo"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_RELWITHDEBINFO"
+# PROP Intermediate_Dir "RelWithDebInfo"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /IGNORE:4089
+# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /IGNORE:4089 TARGET_VERSION_FLAG
+# ADD LINK32 /out:"OUTPUT_DIRECTORY_RELWITHDEBINFO\OUTPUT_NAME_RELWITHDEBINFO" TARGET_IMPLIB_FLAG_RELWITHDEBINFO
+CM_MULTILINE_OPTIONS_RELWITHDEBINFO
+
+CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO
+
+!ENDIF
+
+# Begin Target
+
+# Name "OUTPUT_LIBNAME - Win32 Release"
+# Name "OUTPUT_LIBNAME - Win32 Debug"
+# Name "OUTPUT_LIBNAME - Win32 MinSizeRel"
+# Name "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
diff --git a/Templates/EXEWinHeader.dsptemplate b/Templates/EXEWinHeader.dsptemplate
new file mode 100644
index 000000000..e0d226479
--- /dev/null
+++ b/Templates/EXEWinHeader.dsptemplate
@@ -0,0 +1,187 @@
+# Microsoft Developer Studio Project File - Name="pcbuilder" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# CM DSP Header file
+# This file is read by the build system of cm, and is used as the top part of
+# a microsoft project dsp header file
+# IF this is in a dsp file, then it is not the header, but has
+# already been used, so do not edit here...
+
+# variables to REPLACE
+#
+# BUILD_INCLUDES == include path
+# OUTPUT_DIRECTORY == override in output directory
+# EXTRA_DEFINES == compiler defines
+# OUTPUT_LIBNAME == name of output library
+# CM_LIBRARIES == libraries linked in
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=OUTPUT_LIBNAME - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "OUTPUT_LIBNAME - Win32 MinSizeRel" (based on "Win32 (x86) Application")
+!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "OUTPUT_LIBNAME - Win32 RelWithDebInfo" (based on "Win32 (x86) Application")
+!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_RELEASE"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_RELEASE
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_RELEASE
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /IGNORE:4089
+# ADD LINK32 /nologo /subsystem:windows /machine:I386 /IGNORE:4089 TARGET_VERSION_FLAG
+# ADD LINK32 /out:"OUTPUT_DIRECTORY_RELEASE\OUTPUT_NAME_RELEASE" TARGET_IMPLIB_FLAG_RELEASE
+CM_MULTILINE_OPTIONS_RELEASE
+
+CMAKE_CUSTOM_RULE_CODE_RELEASE
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "OUTPUT_DIRECTORY_DEBUG"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /GZ /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_DEBUG
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "_DEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_DEBUG
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /IGNORE:4089
+# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /IGNORE:4089 TARGET_VERSION_FLAG
+# ADD LINK32 /out:"OUTPUT_DIRECTORY_DEBUG\OUTPUT_NAME_DEBUG" TARGET_IMPLIB_FLAG_DEBUG
+CM_MULTILINE_OPTIONS_DEBUG
+
+CMAKE_CUSTOM_RULE_CODE_DEBUG
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel"
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "MinSizeRel"
+# PROP BASE Intermediate_Dir "MinSizeRel"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_MINSIZEREL"
+# PROP Intermediate_Dir "MinSizeRel"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /pdbtype:sept /IGNORE:4089
+# ADD LINK32 /nologo /subsystem:windows /machine:I386 /pdbtype:sept /IGNORE:4089 TARGET_VERSION_FLAG
+# ADD LINK32 /out:"OUTPUT_DIRECTORY_MINSIZEREL\OUTPUT_NAME_MINSIZEREL" TARGET_IMPLIB_FLAG_MINSIZEREL
+CM_MULTILINE_OPTIONS_MINSIZEREL
+
+CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "RelWithDebInfo"
+# PROP BASE Intermediate_Dir "RelWithDebInfo"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_RELWITHDEBINFO"
+# PROP Intermediate_Dir "RelWithDebInfo"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /IGNORE:4089
+# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /IGNORE:4089 TARGET_VERSION_FLAG
+# ADD LINK32 /out:"OUTPUT_DIRECTORY_RELWITHDEBINFO\OUTPUT_NAME_RELWITHDEBINFO" TARGET_IMPLIB_FLAG_RELWITHDEBINFO
+CM_MULTILINE_OPTIONS_RELWITHDEBINFO
+
+CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO
+
+!ENDIF
+
+# Begin Target
+
+# Name "OUTPUT_LIBNAME - Win32 Release"
+# Name "OUTPUT_LIBNAME - Win32 Debug"
+# Name "OUTPUT_LIBNAME - Win32 MinSizeRel"
+# Name "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in
new file mode 100644
index 000000000..9e5303004
--- /dev/null
+++ b/Templates/TestDriver.cxx.in
@@ -0,0 +1,155 @@
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+@CMAKE_TESTDRIVER_EXTRA_INCLUDES@
+
+
+/* Forward declare test functions. */
+@CMAKE_FORWARD_DECLARE_TESTS@
+
+/* Create map. */
+
+typedef int (*MainFuncPointer)(int , char*[]);
+typedef struct
+{
+ const char* name;
+ MainFuncPointer func;
+} functionMapEntry;
+
+functionMapEntry cmakeGeneratedFunctionMapEntries[] = {
+ @CMAKE_FUNCTION_TABLE_ENTIRES@
+ {0,0}
+};
+
+/* Allocate and create a lowercased copy of string
+ (note that it has to be free'd manually) */
+
+char* lowercase(const char *string)
+{
+ char *new_string, *p;
+
+#ifdef __cplusplus
+ new_string = static_cast<char *>(malloc(sizeof(char) *
+ static_cast<size_t>(strlen(string) + 1)));
+#else
+ new_string = (char *)(malloc(sizeof(char) * (size_t)(strlen(string) + 1)));
+#endif
+
+ if (!new_string)
+ {
+ return 0;
+ }
+ strcpy(new_string, string);
+ p = new_string;
+ while (*p != 0)
+ {
+#ifdef __cplusplus
+ *p = static_cast<char>(tolower(*p));
+#else
+ *p = (char)(tolower(*p));
+#endif
+
+ ++p;
+ }
+ return new_string;
+}
+
+int main(int ac, char *av[])
+{
+ int i, NumTests, testNum, partial_match;
+ char *arg, *test_name;
+ int count;
+ int testToRun = -1;
+
+ @CMAKE_TESTDRIVER_ARGVC_FUNCTION@
+
+ for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++)
+ {
+ }
+ NumTests = count;
+ /* If no test name was given */
+ /* process command line with user function. */
+ if (ac < 2)
+ {
+ /* Ask for a test. */
+ printf("Available tests:\n");
+ for (i =0; i < NumTests; ++i)
+ {
+ printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
+ }
+ printf("To run a test, enter the test number: ");
+ fflush(stdout);
+ testNum = 0;
+ if( scanf("%d", &testNum) != 1 )
+ {
+ printf("Couldn't parse that input as a number\n");
+ return -1;
+ }
+ if (testNum >= NumTests)
+ {
+ printf("%3d is an invalid test number.\n", testNum);
+ return -1;
+ }
+ testToRun = testNum;
+ ac--;
+ av++;
+ }
+ partial_match = 0;
+ arg = 0;
+ /* If partial match is requested. */
+ if(testToRun == -1 && ac > 1)
+ {
+ partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
+ }
+ if (partial_match && ac < 3)
+ {
+ printf("-R needs an additional parameter.\n");
+ return -1;
+ }
+ if(testToRun == -1)
+ {
+ arg = lowercase(av[1 + partial_match]);
+ }
+ for (i =0; i < NumTests && testToRun == -1; ++i)
+ {
+ test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
+ if (partial_match && strstr(test_name, arg) != NULL)
+ {
+ testToRun = i;
+ ac -=2;
+ av += 2;
+ }
+ else if (!partial_match && strcmp(test_name, arg) == 0)
+ {
+ testToRun = i;
+ ac--;
+ av++;
+ }
+ free(test_name);
+ }
+ if(arg)
+ {
+ free(arg);
+ }
+ if(testToRun != -1)
+ {
+ int result;
+@CMAKE_TESTDRIVER_BEFORE_TESTMAIN@
+ result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
+@CMAKE_TESTDRIVER_AFTER_TESTMAIN@
+ return result;
+ }
+
+
+ /* Nothing was run, display the test names. */
+ printf("Available tests:\n");
+ for (i =0; i < NumTests; ++i)
+ {
+ printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
+ }
+ printf("Failed: %s is an invalid test name.\n", av[1]);
+
+ return -1;
+}
diff --git a/Templates/UtilityFooter.dsptemplate b/Templates/UtilityFooter.dsptemplate
new file mode 100644
index 000000000..941fb446a
--- /dev/null
+++ b/Templates/UtilityFooter.dsptemplate
@@ -0,0 +1,2 @@
+# End Target
+# End Project
diff --git a/Templates/UtilityHeader.dsptemplate b/Templates/UtilityHeader.dsptemplate
new file mode 100644
index 000000000..509f597f1
--- /dev/null
+++ b/Templates/UtilityHeader.dsptemplate
@@ -0,0 +1,95 @@
+# Microsoft Developer Studio Project File - Name="OUTPUT_LIBNAME" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=OUTPUT_LIBNAME - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "OUTPUT_LIBNAME - Win32 MinSizeRel" (based on "Win32 (x86) Generic Project")
+!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "OUTPUT_LIBNAME - Win32 RelWithDebInfo" (based on "Win32 (x86) Generic Project")
+!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+
+CMAKE_CUSTOM_RULE_CODE_RELEASE
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+
+CMAKE_CUSTOM_RULE_CODE_DEBUG
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "MinSizeRel"
+# PROP BASE Intermediate_Dir "MinSizeRel"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Intermediate_Dir "MinSizeRel"
+# PROP Target_Dir ""
+
+CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "RelWithDebInfo"
+# PROP BASE Intermediate_Dir "RelWithDebInfo"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Intermediate_Dir "RelWithDebInfo"
+# PROP Target_Dir ""
+
+CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO
+
+!ENDIF
+
+# Begin Target
+
+# Name "OUTPUT_LIBNAME - Win32 Release"
+# Name "OUTPUT_LIBNAME - Win32 Debug"
+# Name "OUTPUT_LIBNAME - Win32 MinSizeRel"
+# Name "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
diff --git a/Templates/cygwin-package.sh.in b/Templates/cygwin-package.sh.in
new file mode 100755
index 000000000..8482e7e4d
--- /dev/null
+++ b/Templates/cygwin-package.sh.in
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+# this is a sample shell script used for building a cmake
+# based project for a cygwin setup package.
+
+# get the current directory
+TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`
+
+# create build directory
+mkdirs()
+{
+ (
+ mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build"
+ )
+}
+
+# cd into
+# untar source tree and apply patch
+prep()
+{
+ (
+ cd "$TOP_DIR" &&
+ tar xvfj @CPACK_PACKAGE_FILE_NAME@.tar.bz2
+ patch -p0 < "@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.patch" &&
+ mkdirs
+ )
+}
+
+# configure the build tree in .build directory
+# of the source tree
+conf()
+{
+ (
+ cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
+ cmake ..
+ )
+}
+
+# build the package in the .build directory
+build()
+{
+ (
+ cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
+ make &&
+ make test
+ )
+}
+
+# clean the build tree
+clean()
+{
+ (
+ cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
+ make clean
+ )
+}
+
+# create the package
+pkg()
+{
+ (
+ cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
+ cpack &&
+ mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.tar.bz2 "$TOP_DIR"
+ )
+}
+
+# create the source package
+spkg()
+{
+ (
+ cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
+ cpack --config CPackSourceConfig.cmake &&
+ mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 "$TOP_DIR"
+ )
+}
+
+# clean up
+finish()
+{
+ (
+ rm -rf "@CPACK_PACKAGE_FILE_NAME@"
+ )
+}
+
+case $1 in
+ prep) prep ; STATUS=$? ;;
+ mkdirs) mkdirs ; STATUS=$? ;;
+ conf) conf ; STATUS=$? ;;
+ build) build ; STATUS=$? ;;
+ clean) clean ; STATUS=$? ;;
+ package) pkg ; STATUS=$? ;;
+ pkg) pkg ; STATUS=$? ;;
+ src-package) spkg ; STATUS=$? ;;
+ spkg) spkg ; STATUS=$? ;;
+ finish) finish ; STATUS=$? ;;
+ all) (
+ prep && conf && build && pkg && spkg && finish ;
+ STATUS=$?
+ ) ;;
+ *) echo "Error: bad argument (all or one of these: prep mkdirs conf build clean package pkg src-package spkg finish)" ; exit 1 ;;
+esac
+exit ${STATUS}
diff --git a/Templates/staticLibFooter.dsptemplate b/Templates/staticLibFooter.dsptemplate
new file mode 100644
index 000000000..0d0682a7b
--- /dev/null
+++ b/Templates/staticLibFooter.dsptemplate
@@ -0,0 +1,4 @@
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/Templates/staticLibHeader.dsptemplate b/Templates/staticLibHeader.dsptemplate
new file mode 100644
index 000000000..16b784e17
--- /dev/null
+++ b/Templates/staticLibHeader.dsptemplate
@@ -0,0 +1,173 @@
+# Microsoft Developer Studio Project File - Name="OUTPUT_LIBNAME" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# CMAKE DSP Header file
+# This file is read by the CMAKE, and is used as the top part of
+# a microsoft project dsp header file
+# IF this is in a dsp file, then it is not the header, but has
+# already been used, so do not edit in that case.
+
+# variables to REPLACE
+#
+# BUILD_INCLUDES == include path
+# EXTRA_DEFINES == compiler defines
+# OUTPUT_DIRECTORY == override in output directory
+# OUTPUT_LIBNAME == name of output library
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=OUTPUT_LIBNAME - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "OUTPUT_LIBNAME - Win32 MinSizeRel" (based on "Win32 (x86) Static Library")
+!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "OUTPUT_LIBNAME - Win32 RelWithDebInfo" (based on "Win32 (x86) Static Library")
+!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Static Library")
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_RELEASE"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
+# ADD CPP /nologo /D "NDEBUG" /D "WIN32" /D "_LIB" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_RELEASE
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_RELEASE
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"OUTPUT_DIRECTORY_RELEASE/OUTPUT_NAME_RELEASE" CM_STATIC_LIB_ARGS_RELEASE
+
+CMAKE_CUSTOM_RULE_CODE_RELEASE
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "OUTPUT_DIRECTORY_DEBUG"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "_DEBUG" /D "_LIB" /FD /c
+# ADD CPP /nologo /D "_DEBUG" /D "WIN32" /D "_LIB" /FD /GZ /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_DEBUG
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "_DEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_DEBUG
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"OUTPUT_DIRECTORY_DEBUG/OUTPUT_NAME_DEBUG" CM_STATIC_LIB_ARGS_DEBUG
+
+CMAKE_CUSTOM_RULE_CODE_DEBUG
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "MinSizeRel"
+# PROP BASE Intermediate_Dir "MinSizeRel"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_MINSIZEREL"
+# PROP Intermediate_Dir "MinSizeRel"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_ATL_DLL" /FD /c
+# ADD CPP /nologo /D "NDEBUG" /D "_ATL_DLL" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"OUTPUT_DIRECTORY_MINSIZEREL/OUTPUT_NAME_MINSIZEREL" CM_STATIC_LIB_ARGS_MINSIZEREL
+
+CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
+
+!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
+
+# PROP BASE Use_MFC CMAKE_MFC_FLAG
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "RelWithDebInfo"
+# PROP BASE Intermediate_Dir "RelWithDebInfo"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC CMAKE_MFC_FLAG
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "OUTPUT_DIRECTORY_RELWITHDEBINFO"
+# PROP Intermediate_Dir "RelWithDebInfo"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
+# ADD CPP /nologo /D "NDEBUG" /D "WIN32" /D "_LIB" /FD /c
+# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
+# ADD CPP CMAKE_CXX_FLAGS
+# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
+# ADD RSC COMPILE_DEFINITIONS
+# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"OUTPUT_DIRECTORY_RELWITHDEBINFO/OUTPUT_NAME_RELWITHDEBINFO" CM_STATIC_LIB_ARGS_RELWITHDEBINFO
+
+CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO
+
+!ENDIF
+
+# Begin Target
+
+# Name "OUTPUT_LIBNAME - Win32 Release"
+# Name "OUTPUT_LIBNAME - Win32 Debug"
+# Name "OUTPUT_LIBNAME - Win32 MinSizeRel"
+# Name "OUTPUT_LIBNAME - Win32 RelWithDebInfo"
+