summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/AddFileDependencies.cmake13
-rw-r--r--Modules/BundleUtilities.cmake16
-rw-r--r--Modules/CMake.cmake13
-rw-r--r--Modules/CMakeASM-ATTInformation.cmake14
-rw-r--r--Modules/CMakeASMInformation.cmake14
-rw-r--r--Modules/CMakeASM_MASMInformation.cmake14
-rw-r--r--Modules/CMakeBackwardCompatibilityC.cmake13
-rw-r--r--Modules/CMakeBackwardCompatibilityCXX.cmake14
-rw-r--r--Modules/CMakeBorlandFindMake.cmake14
-rw-r--r--Modules/CMakeCInformation.cmake13
-rw-r--r--Modules/CMakeCXXInformation.cmake13
-rw-r--r--Modules/CMakeCommonLanguageInclude.cmake13
-rw-r--r--Modules/CMakeDependentOption.cmake14
-rw-r--r--Modules/CMakeDetermineASM-ATTCompiler.cmake14
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake24
-rw-r--r--Modules/CMakeDetermineASM_MASMCompiler.cmake14
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake13
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake13
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake13
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake13
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake13
-rw-r--r--Modules/CMakeDetermineJavaCompiler.cmake13
-rw-r--r--Modules/CMakeDetermineRCCompiler.cmake13
-rw-r--r--Modules/CMakeDetermineSystem.cmake13
-rw-r--r--Modules/CMakeDetermineVSServicePack.cmake16
-rw-r--r--Modules/CMakeExportBuildSettings.cmake13
-rw-r--r--Modules/CMakeFindBinUtils.cmake12
-rw-r--r--Modules/CMakeFindCodeBlocks.cmake14
-rw-r--r--Modules/CMakeFindEclipseCDT4.cmake14
-rw-r--r--Modules/CMakeFindFrameworks.cmake13
-rw-r--r--Modules/CMakeFindKDevelop3.cmake14
-rw-r--r--Modules/CMakeFindWMake.cmake14
-rw-r--r--Modules/CMakeFindXCode.cmake14
-rw-r--r--Modules/CMakeForceCompiler.cmake13
-rw-r--r--Modules/CMakeFortranInformation.cmake13
-rw-r--r--Modules/CMakeGenericSystem.cmake14
-rw-r--r--Modules/CMakeImportBuildSettings.cmake13
-rw-r--r--Modules/CMakeJavaInformation.cmake14
-rw-r--r--Modules/CMakeMSYSFindMake.cmake14
-rw-r--r--Modules/CMakeMinGWFindMake.cmake14
-rw-r--r--Modules/CMakeNMakeFindMake.cmake15
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake13
-rw-r--r--Modules/CMakePrintSystemInformation.cmake13
-rw-r--r--Modules/CMakeRCInformation.cmake14
-rw-r--r--Modules/CMakeSystemSpecificInformation.cmake13
-rw-r--r--Modules/CMakeTestASM-ATTCompiler.cmake13
-rw-r--r--Modules/CMakeTestASMCompiler.cmake13
-rw-r--r--Modules/CMakeTestASM_MASMCompiler.cmake13
-rw-r--r--Modules/CMakeTestCCompiler.cmake13
-rw-r--r--Modules/CMakeTestCXXCompiler.cmake13
-rw-r--r--Modules/CMakeTestFortranCompiler.cmake13
-rw-r--r--Modules/CMakeTestJavaCompiler.cmake13
-rw-r--r--Modules/CMakeTestRCCompiler.cmake13
-rw-r--r--Modules/CMakeUnixFindMake.cmake14
-rw-r--r--Modules/CMakeVS10FindMake.cmake13
-rw-r--r--Modules/CMakeVS6BackwardCompatibility.cmake13
-rw-r--r--Modules/CMakeVS6FindMake.cmake14
-rw-r--r--Modules/CMakeVS71FindMake.cmake14
-rw-r--r--Modules/CMakeVS7BackwardCompatibility.cmake13
-rw-r--r--Modules/CMakeVS7FindMake.cmake14
-rw-r--r--Modules/CMakeVS8FindMake.cmake13
-rw-r--r--Modules/CMakeVS9FindMake.cmake13
-rw-r--r--Modules/COPYING-CMAKE-SCRIPTS22
-rw-r--r--Modules/CPack.cmake12
-rw-r--r--Modules/CPackDeb.cmake13
-rw-r--r--Modules/CPackRPM.cmake13
-rw-r--r--Modules/CPackZIP.cmake14
-rw-r--r--Modules/CTest.cmake13
-rw-r--r--Modules/CTestScriptMode.cmake14
-rw-r--r--Modules/CTestTargets.cmake14
-rw-r--r--Modules/CheckCCompilerFlag.cmake16
-rw-r--r--Modules/CheckCSourceCompiles.cmake13
-rw-r--r--Modules/CheckCSourceRuns.cmake13
-rw-r--r--Modules/CheckCXXCompilerFlag.cmake16
-rw-r--r--Modules/CheckCXXSourceCompiles.cmake13
-rw-r--r--Modules/CheckCXXSourceRuns.cmake13
-rw-r--r--Modules/CheckFortranFunctionExists.cmake13
-rw-r--r--Modules/CheckFunctionExists.cmake13
-rw-r--r--Modules/CheckIncludeFile.cmake14
-rw-r--r--Modules/CheckIncludeFileCXX.cmake14
-rw-r--r--Modules/CheckIncludeFiles.cmake13
-rw-r--r--Modules/CheckLibraryExists.cmake13
-rw-r--r--Modules/CheckSizeOf.cmake14
-rw-r--r--Modules/CheckStructHasMember.cmake12
-rw-r--r--Modules/CheckSymbolExists.cmake13
-rw-r--r--Modules/CheckTypeSize.cmake13
-rw-r--r--Modules/CheckVariableExists.cmake13
-rw-r--r--Modules/Compiler/XL-C.cmake13
-rw-r--r--Modules/Compiler/XL-CXX.cmake11
-rw-r--r--Modules/Compiler/XL-Fortran.cmake5
-rw-r--r--Modules/Dart.cmake14
-rw-r--r--Modules/Documentation.cmake13
-rw-r--r--Modules/ExternalProject.cmake70
-rw-r--r--Modules/FLTKCompatibility.cmake14
-rw-r--r--Modules/FeatureSummary.cmake12
-rw-r--r--Modules/FindALSA.cmake14
-rw-r--r--Modules/FindASPELL.cmake16
-rw-r--r--Modules/FindAVIFile.cmake13
-rw-r--r--Modules/FindBISON.cmake321
-rw-r--r--Modules/FindBLAS.cmake14
-rw-r--r--Modules/FindBZip2.cmake16
-rw-r--r--Modules/FindBoost.cmake30
-rw-r--r--Modules/FindBullet.cmake158
-rw-r--r--Modules/FindCABLE.cmake13
-rw-r--r--Modules/FindCUDA.cmake2398
-rw-r--r--Modules/FindCUDA/make2cmake.cmake154
-rw-r--r--Modules/FindCUDA/parse_cubin.cmake54
-rw-r--r--Modules/FindCUDA/run_nvcc.cmake501
-rw-r--r--Modules/FindCURL.cmake13
-rw-r--r--Modules/FindCVS.cmake13
-rw-r--r--Modules/FindCoin3D.cmake14
-rw-r--r--Modules/FindCups.cmake16
-rw-r--r--Modules/FindCurses.cmake13
-rw-r--r--Modules/FindCxxTest.cmake22
-rw-r--r--Modules/FindCygwin.cmake13
-rw-r--r--Modules/FindDCMTK.cmake14
-rw-r--r--Modules/FindDart.cmake13
-rw-r--r--Modules/FindDevIL.cmake15
-rw-r--r--Modules/FindDoxygen.cmake13
-rw-r--r--Modules/FindEXPAT.cmake13
-rw-r--r--Modules/FindFLEX.cmake35
-rw-r--r--Modules/FindFLTK.cmake13
-rw-r--r--Modules/FindFLTK2.cmake13
-rw-r--r--Modules/FindFreetype.cmake13
-rw-r--r--Modules/FindGCCXML.cmake14
-rw-r--r--Modules/FindGDAL.cmake14
-rw-r--r--Modules/FindGIF.cmake13
-rw-r--r--Modules/FindGLU.cmake12
-rw-r--r--Modules/FindGLUT.cmake13
-rw-r--r--Modules/FindGTK.cmake13
-rw-r--r--Modules/FindGTK2.cmake20
-rw-r--r--Modules/FindGTest.cmake174
-rw-r--r--Modules/FindGettext.cmake13
-rw-r--r--Modules/FindGnuTLS.cmake21
-rw-r--r--Modules/FindGnuplot.cmake13
-rw-r--r--Modules/FindHDF5.cmake13
-rw-r--r--Modules/FindHSPELL.cmake16
-rw-r--r--Modules/FindHTMLHelp.cmake13
-rw-r--r--Modules/FindITK.cmake12
-rw-r--r--Modules/FindImageMagick.cmake16
-rw-r--r--Modules/FindJNI.cmake104
-rw-r--r--Modules/FindJPEG.cmake13
-rw-r--r--Modules/FindJasper.cmake16
-rw-r--r--Modules/FindJava.cmake14
-rw-r--r--Modules/FindKDE3.cmake14
-rw-r--r--Modules/FindKDE4.cmake14
-rw-r--r--Modules/FindLAPACK.cmake14
-rw-r--r--Modules/FindLATEX.cmake13
-rw-r--r--Modules/FindLibXml2.cmake16
-rw-r--r--Modules/FindLibXslt.cmake16
-rw-r--r--Modules/FindLua50.cmake12
-rw-r--r--Modules/FindLua51.cmake12
-rw-r--r--Modules/FindMFC.cmake13
-rw-r--r--Modules/FindMPEG.cmake13
-rw-r--r--Modules/FindMPEG2.cmake13
-rw-r--r--Modules/FindMPI.cmake13
-rw-r--r--Modules/FindMatlab.cmake12
-rw-r--r--Modules/FindMotif.cmake13
-rw-r--r--Modules/FindOpenAL.cmake13
-rw-r--r--Modules/FindOpenGL.cmake13
-rw-r--r--Modules/FindOpenMP.cmake18
-rw-r--r--Modules/FindOpenSSL.cmake16
-rw-r--r--Modules/FindOpenSceneGraph.cmake21
-rw-r--r--Modules/FindOpenThreads.cmake13
-rw-r--r--Modules/FindPHP4.cmake13
-rw-r--r--Modules/FindPNG.cmake12
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake13
-rw-r--r--Modules/FindPackageMessage.cmake13
-rw-r--r--Modules/FindPerl.cmake13
-rw-r--r--Modules/FindPerlLibs.cmake13
-rw-r--r--Modules/FindPhysFS.cmake13
-rw-r--r--Modules/FindPike.cmake13
-rw-r--r--Modules/FindPkgConfig.cmake12
-rw-r--r--Modules/FindProducer.cmake13
-rw-r--r--Modules/FindProtobuf.cmake18
-rw-r--r--Modules/FindPythonInterp.cmake13
-rw-r--r--Modules/FindPythonLibs.cmake13
-rw-r--r--Modules/FindQt.cmake12
-rw-r--r--Modules/FindQt3.cmake13
-rw-r--r--Modules/FindQt4.cmake12
-rw-r--r--Modules/FindQuickTime.cmake13
-rw-r--r--Modules/FindRTI.cmake14
-rw-r--r--Modules/FindRuby.cmake17
-rw-r--r--Modules/FindSDL.cmake13
-rw-r--r--Modules/FindSDL_image.cmake13
-rw-r--r--Modules/FindSDL_mixer.cmake13
-rw-r--r--Modules/FindSDL_net.cmake12
-rw-r--r--Modules/FindSDL_sound.cmake12
-rw-r--r--Modules/FindSDL_ttf.cmake13
-rw-r--r--Modules/FindSWIG.cmake13
-rw-r--r--Modules/FindSelfPackers.cmake13
-rw-r--r--Modules/FindSquish.cmake13
-rw-r--r--Modules/FindSubversion.cmake35
-rw-r--r--Modules/FindTCL.cmake13
-rw-r--r--Modules/FindTIFF.cmake13
-rw-r--r--Modules/FindTclStub.cmake13
-rw-r--r--Modules/FindTclsh.cmake13
-rw-r--r--Modules/FindThreads.cmake13
-rw-r--r--Modules/FindUnixCommands.cmake13
-rw-r--r--Modules/FindVTK.cmake13
-rw-r--r--Modules/FindWget.cmake13
-rw-r--r--Modules/FindWish.cmake14
-rw-r--r--Modules/FindX11.cmake14
-rw-r--r--Modules/FindXMLRPC.cmake13
-rw-r--r--Modules/FindZLIB.cmake12
-rw-r--r--Modules/Findosg.cmake13
-rw-r--r--Modules/FindosgAnimation.cmake13
-rw-r--r--Modules/FindosgDB.cmake13
-rw-r--r--Modules/FindosgFX.cmake13
-rw-r--r--Modules/FindosgGA.cmake13
-rw-r--r--Modules/FindosgIntrospection.cmake13
-rw-r--r--Modules/FindosgManipulator.cmake13
-rw-r--r--Modules/FindosgParticle.cmake13
-rw-r--r--Modules/FindosgProducer.cmake13
-rw-r--r--Modules/FindosgShadow.cmake13
-rw-r--r--Modules/FindosgSim.cmake13
-rw-r--r--Modules/FindosgTerrain.cmake13
-rw-r--r--Modules/FindosgText.cmake13
-rw-r--r--Modules/FindosgUtil.cmake13
-rw-r--r--Modules/FindosgViewer.cmake13
-rw-r--r--Modules/FindosgVolume.cmake13
-rw-r--r--Modules/FindosgWidget.cmake13
-rw-r--r--Modules/Findosg_functions.cmake14
-rw-r--r--Modules/FindwxWidgets.cmake15
-rw-r--r--Modules/FindwxWindows.cmake13
-rw-r--r--Modules/FortranCInterface.cmake13
-rw-r--r--Modules/FortranCInterface/CMakeLists.txt11
-rw-r--r--Modules/FortranCInterface/Detect.cmake11
-rw-r--r--Modules/FortranCInterface/Verify/CMakeLists.txt11
-rw-r--r--Modules/GetPrerequisites.cmake20
-rw-r--r--Modules/ITKCompatibility.cmake14
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake13
-rw-r--r--Modules/KDE3Macros.cmake14
-rw-r--r--Modules/MacroAddFileDependencies.cmake12
-rw-r--r--Modules/Platform/AIX-VisualAge-C.cmake1
-rw-r--r--Modules/Platform/AIX-VisualAge-CXX.cmake1
-rw-r--r--Modules/Platform/AIX-XL-C.cmake4
-rw-r--r--Modules/Platform/AIX-XL-CXX.cmake4
-rw-r--r--Modules/Platform/AIX-XL-Fortran.cmake4
-rw-r--r--Modules/Platform/AIX.cmake31
-rw-r--r--Modules/Platform/Darwin-VisualAge-C.cmake1
-rw-r--r--Modules/Platform/Darwin-VisualAge-CXX.cmake1
-rw-r--r--Modules/Platform/Darwin-XL-C.cmake (renamed from Modules/Platform/Darwin-xlc.cmake)1
-rw-r--r--Modules/Platform/Darwin-XL-CXX.cmake5
-rw-r--r--Modules/Platform/Haiku.cmake5
-rw-r--r--Modules/Platform/Linux-XL-C.cmake1
-rw-r--r--Modules/Platform/Linux-XL-CXX.cmake2
-rw-r--r--Modules/Platform/Linux-XL-Fortran.cmake1
-rw-r--r--Modules/SelectLibraryConfigurations.cmake15
-rw-r--r--Modules/SquishTestScript.cmake13
-rw-r--r--Modules/SystemInformation.cmake14
-rw-r--r--Modules/TestBigEndian.cmake13
-rw-r--r--Modules/TestCXXAcceptsFlag.cmake13
-rw-r--r--Modules/TestForANSIForScope.cmake13
-rw-r--r--Modules/TestForANSIStreamHeaders.cmake14
-rw-r--r--Modules/TestForSSTREAM.cmake14
-rw-r--r--Modules/TestForSTDNamespace.cmake14
-rw-r--r--Modules/UseEcos.cmake13
-rw-r--r--Modules/UsePkgConfig.cmake13
-rw-r--r--Modules/UseQt4.cmake14
-rw-r--r--Modules/UseSWIG.cmake13
-rw-r--r--Modules/UseVTK40.cmake13
-rw-r--r--Modules/UseVTKBuildSettings40.cmake13
-rw-r--r--Modules/UseVTKConfig40.cmake13
-rw-r--r--Modules/Use_wxWindows.cmake14
-rw-r--r--Modules/UsewxWidgets.cmake13
-rw-r--r--Modules/VTKCompatibility.cmake14
-rw-r--r--Modules/ecos_clean.cmake14
-rw-r--r--Modules/kde3uic.cmake13
-rw-r--r--Modules/readme.txt4
270 files changed, 5337 insertions, 2063 deletions
diff --git a/Modules/AddFileDependencies.cmake b/Modules/AddFileDependencies.cmake
index 0ea6470..ae2e803 100644
--- a/Modules/AddFileDependencies.cmake
+++ b/Modules/AddFileDependencies.cmake
@@ -2,6 +2,19 @@
# Adds the given files as dependencies to source_file
#
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(ADD_FILE_DEPENDENCIES _file)
GET_SOURCE_FILE_PROPERTY(_deps ${_file} OBJECT_DEPENDS)
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index fba5a15..d9c41f4 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -23,6 +23,18 @@
# Requires CMake 2.6 or greater because it uses function, break and
# PARENT_SCOPE. Also depends on GetPrerequisites.cmake.
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# The functions defined in this file depend on the get_prerequisites function
# (and possibly others) found in:
@@ -414,6 +426,10 @@ function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
#message(STATUS "copying COMMAND ${CMAKE_COMMAND} -E copy ${resolved_item} ${resolved_embedded_item}")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${resolved_item}" "${resolved_embedded_item}")
endif()
+
+ if(UNIX AND NOT APPLE)
+ file(RPATH_REMOVE FILE "${resolved_embedded_item}")
+ endif(UNIX AND NOT APPLE)
endfunction(copy_resolved_item_into_bundle)
diff --git a/Modules/CMake.cmake b/Modules/CMake.cmake
index 7689bd9..cbdaa35 100644
--- a/Modules/CMake.cmake
+++ b/Modules/CMake.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is used by cmake.cxx to compute the CMAKE_ROOT location.
# Do not remove this file from cvs without updating cmake.cxx to look
# for a different file.
diff --git a/Modules/CMakeASM-ATTInformation.cmake b/Modules/CMakeASM-ATTInformation.cmake
index ccd8b12..51c445b 100644
--- a/Modules/CMakeASM-ATTInformation.cmake
+++ b/Modules/CMakeASM-ATTInformation.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# support for AT&T syntax assemblers, e.g. GNU as
SET(ASM_DIALECT "-ATT")
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index cef1e78..c495810 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MESSAGE(STATUS "Loaded CMakeASM${ASM_DIALECT}Information - ASM${ASM_DIALECT} support is still experimental, please report issues")
IF(UNIX)
diff --git a/Modules/CMakeASM_MASMInformation.cmake b/Modules/CMakeASM_MASMInformation.cmake
index 05366b9..2f27d2a 100644
--- a/Modules/CMakeASM_MASMInformation.cmake
+++ b/Modules/CMakeASM_MASMInformation.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# support for the MS assembler, masm and masm64
SET(ASM_DIALECT "_MASM")
diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake
index 0333384..b7014cf 100644
--- a/Modules/CMakeBackwardCompatibilityC.cmake
+++ b/Modules/CMakeBackwardCompatibilityC.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Nothing here yet
IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
INCLUDE(CMakeVS7BackwardCompatibility)
diff --git a/Modules/CMakeBackwardCompatibilityCXX.cmake b/Modules/CMakeBackwardCompatibilityCXX.cmake
index 29dabc6..a4175e8 100644
--- a/Modules/CMakeBackwardCompatibilityCXX.cmake
+++ b/Modules/CMakeBackwardCompatibilityCXX.cmake
@@ -5,6 +5,20 @@
# INCLUDE(CheckIncludeFileCXX)
# INCLUDE(TestForSTDNamespace)
# INCLUDE(TestForANSIForScope)
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
# check for some ANSI flags in the CXX compiler if it is not gnu
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
diff --git a/Modules/CMakeBorlandFindMake.cmake b/Modules/CMakeBorlandFindMake.cmake
index 7efc1c2..d908168 100644
--- a/Modules/CMakeBorlandFindMake.cmake
+++ b/Modules/CMakeBorlandFindMake.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
SET (CMAKE_MAKE_PROGRAM "make" CACHE STRING
"Program used to build from makefiles.")
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index e163b30..aa8fdc7 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file sets the basic flags for the C language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 4f536e6..681e495 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file sets the basic flags for the C++ language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake
index 373a9a3..80d5678 100644
--- a/Modules/CMakeCommonLanguageInclude.cmake
+++ b/Modules/CMakeCommonLanguageInclude.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# this file has flags that are shared across languages and sets
# cache values that can be initialized in the platform-compiler.cmake file
# it may be included by more than one language.
diff --git a/Modules/CMakeDependentOption.cmake b/Modules/CMakeDependentOption.cmake
index 2183191..4d978c4 100644
--- a/Modules/CMakeDependentOption.cmake
+++ b/Modules/CMakeDependentOption.cmake
@@ -11,6 +11,20 @@
# the status of USE_BAR or USE_ZOT ever changes, any value for the
# USE_FOO option is saved so that when the option is re-enabled it
# retains its old value.
+
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CMAKE_DEPENDENT_OPTION option doc default depends force)
IF(${option}_ISSET MATCHES "^${option}_ISSET$")
SET(${option}_AVAILABLE 1)
diff --git a/Modules/CMakeDetermineASM-ATTCompiler.cmake b/Modules/CMakeDetermineASM-ATTCompiler.cmake
index 5861159..99c591b 100644
--- a/Modules/CMakeDetermineASM-ATTCompiler.cmake
+++ b/Modules/CMakeDetermineASM-ATTCompiler.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# determine the compiler to use for ASM using AT&T syntax, e.g. GNU as
SET(ASM_DIALECT "-ATT")
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index da7194a..adf1408 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# determine the compiler to use for ASM programs
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
@@ -21,7 +35,7 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
- # we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt
+ # we only get here if CMAKE_ASM${ASM_DIALECT}_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
#
# if a compiler was specified by the user but without path,
@@ -43,11 +57,11 @@ IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
-# If we have a gcc cross compiler, they have usually some prefix, like
-# e.g. powerpc-linux-gcc, arm-elf-gcc or i586-mingw32msvc-gcc .
+# If we have a gas/as cross compiler, they have usually some prefix, like
+# e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas .
# The other tools of the toolchain usually have the same prefix
# NAME_WE cannot be used since then this test will fail for names lile
-# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
+# "arm-unknown-nto-qnx6.3.0-gas.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
@@ -58,7 +72,7 @@ ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
INCLUDE(CMakeFindBinUtils)
-SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM")
+SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM${ASM_DIALECT}")
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
MESSAGE(STATUS "Found assembler: ${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
diff --git a/Modules/CMakeDetermineASM_MASMCompiler.cmake b/Modules/CMakeDetermineASM_MASMCompiler.cmake
index 3b72e07..8223ea0 100644
--- a/Modules/CMakeDetermineASM_MASMCompiler.cmake
+++ b/Modules/CMakeDetermineASM_MASMCompiler.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Find the MS assembler (masm or masm64)
SET(ASM_DIALECT "_MASM")
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index bb119cd..a655b0f 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# determine the compiler to use for C programs
# NOTE, a generator may set CMAKE_C_COMPILER before
# loading this file to force a compiler.
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 87abffa..13d944e 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# determine the compiler to use for C++ programs
# NOTE, a generator may set CMAKE_CXX_COMPILER before
# loading this file to force a compiler.
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index 0e2445a..872e9ab 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Function to compile a source file to identify the compiler ABI.
# This is used internally by CMake and should not be included by user
# code.
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index dfbaefb..3899462 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Function to compile a source file to identify the compiler. This is
# used internally by CMake and should not be included by user code.
# If successful, sets CMAKE_<lang>_COMPILER_ID and CMAKE_<lang>_PLATFORM_ID
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 23c6675..8adacd6 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# determine the compiler to use for Fortran programs
# NOTE, a generator may set CMAKE_Fortran_COMPILER before
# loading this file to force a compiler.
diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake
index f221447..ee7ccb0 100644
--- a/Modules/CMakeDetermineJavaCompiler.cmake
+++ b/Modules/CMakeDetermineJavaCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# determine the compiler to use for Java programs
# NOTE, a generator may set CMAKE_Java_COMPILER before
# loading this file to force a compiler.
diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake
index 1bea04a..e1b6df2 100644
--- a/Modules/CMakeDetermineRCCompiler.cmake
+++ b/Modules/CMakeDetermineRCCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# determine the compiler to use for C programs
# NOTE, a generator may set CMAKE_C_COMPILER before
# loading this file to force a compiler.
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index aa3b59b..68a9480 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This module is used by the Makefile generator to determin the following variables:
# CMAKE_SYSTEM_NAME - on unix this is uname -s, for windows it is Windows
# CMAKE_SYSTEM_VERSION - on unix this is uname -r, for windows it is empty
diff --git a/Modules/CMakeDetermineVSServicePack.cmake b/Modules/CMakeDetermineVSServicePack.cmake
index e1452ce..a5bb528 100644
--- a/Modules/CMakeDetermineVSServicePack.cmake
+++ b/Modules/CMakeDetermineVSServicePack.cmake
@@ -21,7 +21,21 @@
# endif()
#
# ===========================
-
+
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2009 Philip Lowman <philip@yhbt.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# [INTERNAL]
# Please do not call this function directly
function(_DetermineVSServicePackFromCompiler _OUT_VAR _cl_version)
diff --git a/Modules/CMakeExportBuildSettings.cmake b/Modules/CMakeExportBuildSettings.cmake
index b14455b..f7d7de1 100644
--- a/Modules/CMakeExportBuildSettings.cmake
+++ b/Modules/CMakeExportBuildSettings.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This module is purposely no longer documented. It does nothing useful.
IF(NOT "${CMAKE_MINIMUM_REQUIRED_VERSION}" VERSION_LESS 2.7)
MESSAGE(FATAL_ERROR
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index dc64673..d27c978 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -16,6 +16,18 @@
# on UNIX, cygwin and mingw
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# if it's the MS C/CXX compiler, search for link
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
diff --git a/Modules/CMakeFindCodeBlocks.cmake b/Modules/CMakeFindCodeBlocks.cmake
index 8f54b75..0dbe20f 100644
--- a/Modules/CMakeFindCodeBlocks.cmake
+++ b/Modules/CMakeFindCodeBlocks.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is included in CMakeSystemSpecificInformation.cmake if
# the CodeBlocks extra generator has been selected.
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake
index 3a5780d..f479285 100644
--- a/Modules/CMakeFindEclipseCDT4.cmake
+++ b/Modules/CMakeFindEclipseCDT4.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is included in CMakeSystemSpecificInformation.cmake if
# the Eclipse CDT4 extra generator has been selected.
diff --git a/Modules/CMakeFindFrameworks.cmake b/Modules/CMakeFindFrameworks.cmake
index 3a47eb0..1bc8935 100644
--- a/Modules/CMakeFindFrameworks.cmake
+++ b/Modules/CMakeFindFrameworks.cmake
@@ -1,5 +1,18 @@
# - helper module to find OSX frameworks
+#=============================================================================
+# Copyright 2003-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
SET(CMAKE_FIND_FRAMEWORKS_INCLUDED 1)
MACRO(CMAKE_FIND_FRAMEWORKS fwk)
diff --git a/Modules/CMakeFindKDevelop3.cmake b/Modules/CMakeFindKDevelop3.cmake
index 32f39c2..1c77365 100644
--- a/Modules/CMakeFindKDevelop3.cmake
+++ b/Modules/CMakeFindKDevelop3.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is included in CMakeSystemSpecificInformation.cmake if
# the KDevelop3 extra generator has been selected.
diff --git a/Modules/CMakeFindWMake.cmake b/Modules/CMakeFindWMake.cmake
index 4353d65..e4bbb3d 100644
--- a/Modules/CMakeFindWMake.cmake
+++ b/Modules/CMakeFindWMake.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
SET (CMAKE_MAKE_PROGRAM "wmake" CACHE STRING
"Program used to build from makefiles.")
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeFindXCode.cmake b/Modules/CMakeFindXCode.cmake
index 417edc5..240f936 100644
--- a/Modules/CMakeFindXCode.cmake
+++ b/Modules/CMakeFindXCode.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES xcodebuild
PATHS
diff --git a/Modules/CMakeForceCompiler.cmake b/Modules/CMakeForceCompiler.cmake
index c473011..c9793b4 100644
--- a/Modules/CMakeForceCompiler.cmake
+++ b/Modules/CMakeForceCompiler.cmake
@@ -22,6 +22,19 @@
# CMAKE_FORCE_C_COMPILER (chc12 MetrowerksHicross)
# CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross)
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CMAKE_FORCE_C_COMPILER compiler id)
SET(CMAKE_C_COMPILER "${compiler}")
SET(CMAKE_C_COMPILER_ID_RUN TRUE)
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 443d71e..8d61cfb 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file sets the basic flags for the Fortran language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index 25dbb9e..c66d5c5 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
diff --git a/Modules/CMakeImportBuildSettings.cmake b/Modules/CMakeImportBuildSettings.cmake
index 647084f..968bc79 100644
--- a/Modules/CMakeImportBuildSettings.cmake
+++ b/Modules/CMakeImportBuildSettings.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This module is purposely no longer documented. It does nothing useful.
# This macro used to load build settings from another project that
diff --git a/Modules/CMakeJavaInformation.cmake b/Modules/CMakeJavaInformation.cmake
index 4febed4..f537da5 100644
--- a/Modules/CMakeJavaInformation.cmake
+++ b/Modules/CMakeJavaInformation.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
diff --git a/Modules/CMakeMSYSFindMake.cmake b/Modules/CMakeMSYSFindMake.cmake
index 5a9a342..e95f74f 100644
--- a/Modules/CMakeMSYSFindMake.cmake
+++ b/Modules/CMakeMSYSFindMake.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PROGRAM(CMAKE_MAKE_PROGRAM make
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MSYS-1.0_is1;Inno Setup: App Path]/bin"
diff --git a/Modules/CMakeMinGWFindMake.cmake b/Modules/CMakeMinGWFindMake.cmake
index 2ad0298..68e8442 100644
--- a/Modules/CMakeMinGWFindMake.cmake
+++ b/Modules/CMakeMinGWFindMake.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PROGRAM(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin"
c:/MinGW/bin /MinGW/bin)
diff --git a/Modules/CMakeNMakeFindMake.cmake b/Modules/CMakeNMakeFindMake.cmake
index 13befca..84ea56d 100644
--- a/Modules/CMakeNMakeFindMake.cmake
+++ b/Modules/CMakeNMakeFindMake.cmake
@@ -1,3 +1,18 @@
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+
SET (CMAKE_MAKE_PROGRAM "nmake" CACHE STRING
"Program used to build from makefiles.")
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index 7504392..d0bbc8c 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Function parse implicit linker options.
# This is used internally by CMake and should not be included by user
# code.
diff --git a/Modules/CMakePrintSystemInformation.cmake b/Modules/CMakePrintSystemInformation.cmake
index 2b9ecda..1d3d805 100644
--- a/Modules/CMakePrintSystemInformation.cmake
+++ b/Modules/CMakePrintSystemInformation.cmake
@@ -3,6 +3,19 @@
# just include it in a project to see various internal CMake
# variables.
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MESSAGE("CMAKE_SYSTEM is ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
MESSAGE("CMAKE_SYSTEM file is ${CMAKE_SYSTEM_INFO_FILE}")
MESSAGE("CMAKE_C_COMPILER is ${CMAKE_C_COMPILER}")
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake
index 0efba7c..f6509fb 100644
--- a/Modules/CMakeRCInformation.cmake
+++ b/Modules/CMakeRCInformation.cmake
@@ -1,4 +1,18 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+
# This file sets the basic flags for the Fortran language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake
index e7a4e6c..8d4d51f 100644
--- a/Modules/CMakeSystemSpecificInformation.cmake
+++ b/Modules/CMakeSystemSpecificInformation.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is included by cmGlobalGenerator::EnableLanguage.
# It is included after the compiler has been determined, so
# we know things like the compiler name and if the compiler is gnu.
diff --git a/Modules/CMakeTestASM-ATTCompiler.cmake b/Modules/CMakeTestASM-ATTCompiler.cmake
index 1b4ef4f..9ba306a 100644
--- a/Modules/CMakeTestASM-ATTCompiler.cmake
+++ b/Modules/CMakeTestASM-ATTCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected ASM-ATT compiler can actually compile
# and link the most basic of programs. If not, a fatal error
diff --git a/Modules/CMakeTestASMCompiler.cmake b/Modules/CMakeTestASMCompiler.cmake
index 534b74b..d62a79a 100644
--- a/Modules/CMakeTestASMCompiler.cmake
+++ b/Modules/CMakeTestASMCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected ASM compiler can actually compile
# and link the most basic of programs. If not, a fatal error
diff --git a/Modules/CMakeTestASM_MASMCompiler.cmake b/Modules/CMakeTestASM_MASMCompiler.cmake
index 9bdf13a..63207e3 100644
--- a/Modules/CMakeTestASM_MASMCompiler.cmake
+++ b/Modules/CMakeTestASM_MASMCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that the selected ASM_MASM "compiler" (should be masm or masm64)
# can actually "compile" and link the most basic of programs. If not, a
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index 912f309..856a65b 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2003-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected C compiler can actually compile
# and link the most basic of programs. If not, a fatal error
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index dfa1aae..81b8484 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2003-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected C++ compiler can actually compile
# and link the most basic of programs. If not, a fatal error
diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake
index cb91572..31857b1 100644
--- a/Modules/CMakeTestFortranCompiler.cmake
+++ b/Modules/CMakeTestFortranCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected Fortran compiler can actually compile
# and link the most basic of programs. If not, a fatal error
diff --git a/Modules/CMakeTestJavaCompiler.cmake b/Modules/CMakeTestJavaCompiler.cmake
index a682307..546d9b9 100644
--- a/Modules/CMakeTestJavaCompiler.cmake
+++ b/Modules/CMakeTestJavaCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected Fortran compiler can actually compile
# and link the most basic of programs. If not, a fatal error
diff --git a/Modules/CMakeTestRCCompiler.cmake b/Modules/CMakeTestRCCompiler.cmake
index a8eeaa3..194f860 100644
--- a/Modules/CMakeTestRCCompiler.cmake
+++ b/Modules/CMakeTestRCCompiler.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected RC compiler can actually compile
# and link the most basic of programs. If not, a fatal error
diff --git a/Modules/CMakeUnixFindMake.cmake b/Modules/CMakeUnixFindMake.cmake
index 4272c21..8c9e031 100644
--- a/Modules/CMakeUnixFindMake.cmake
+++ b/Modules/CMakeUnixFindMake.cmake
@@ -1,2 +1,16 @@
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make smake)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeVS10FindMake.cmake b/Modules/CMakeVS10FindMake.cmake
index ce79641..4c8d619 100644
--- a/Modules/CMakeVS10FindMake.cmake
+++ b/Modules/CMakeVS10FindMake.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# VCExpress does not support cross compiling, which is necessary for Win CE
SET( _CMAKE_MAKE_PROGRAM_NAMES devenv)
IF(NOT CMAKE_CROSSCOMPILING)
diff --git a/Modules/CMakeVS6BackwardCompatibility.cmake b/Modules/CMakeVS6BackwardCompatibility.cmake
index 13665f7..8370896 100644
--- a/Modules/CMakeVS6BackwardCompatibility.cmake
+++ b/Modules/CMakeVS6BackwardCompatibility.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# hard code these for fast backwards compatibility tests
SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
diff --git a/Modules/CMakeVS6FindMake.cmake b/Modules/CMakeVS6FindMake.cmake
index e0719cd..0dd21a8 100644
--- a/Modules/CMakeVS6FindMake.cmake
+++ b/Modules/CMakeVS6FindMake.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES msdev
PATHS
diff --git a/Modules/CMakeVS71FindMake.cmake b/Modules/CMakeVS71FindMake.cmake
index 666c83d..8fd332c 100644
--- a/Modules/CMakeVS71FindMake.cmake
+++ b/Modules/CMakeVS71FindMake.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2003-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES devenv
PATHS
diff --git a/Modules/CMakeVS7BackwardCompatibility.cmake b/Modules/CMakeVS7BackwardCompatibility.cmake
index 49b5646..3c78953 100644
--- a/Modules/CMakeVS7BackwardCompatibility.cmake
+++ b/Modules/CMakeVS7BackwardCompatibility.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# hard code these for fast backwards compatibility tests
SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
diff --git a/Modules/CMakeVS7FindMake.cmake b/Modules/CMakeVS7FindMake.cmake
index 2d12267..7f65a28 100644
--- a/Modules/CMakeVS7FindMake.cmake
+++ b/Modules/CMakeVS7FindMake.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES devenv
PATHS
diff --git a/Modules/CMakeVS8FindMake.cmake b/Modules/CMakeVS8FindMake.cmake
index e75e595..6f45ed5 100644
--- a/Modules/CMakeVS8FindMake.cmake
+++ b/Modules/CMakeVS8FindMake.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# VCExpress does not support cross compiling, which is necessary for Win CE
SET( _CMAKE_MAKE_PROGRAM_NAMES devenv)
IF(NOT CMAKE_CROSSCOMPILING)
diff --git a/Modules/CMakeVS9FindMake.cmake b/Modules/CMakeVS9FindMake.cmake
index 0fe87ea..2741f77 100644
--- a/Modules/CMakeVS9FindMake.cmake
+++ b/Modules/CMakeVS9FindMake.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# VCExpress does not support cross compiling, which is necessary for Win CE
SET( _CMAKE_MAKE_PROGRAM_NAMES devenv)
IF(NOT CMAKE_CROSSCOMPILING)
diff --git a/Modules/COPYING-CMAKE-SCRIPTS b/Modules/COPYING-CMAKE-SCRIPTS
deleted file mode 100644
index 4b41776..0000000
--- a/Modules/COPYING-CMAKE-SCRIPTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 6c30af8..9630476 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -389,6 +389,18 @@
# "Modify" button) to change the set of installed components. NO_ADD_REMOVE
# turns off this behavior. This option is ignored on Mac OS X.
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# Pick a configuration file
SET(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 190aa34..8003ad2 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# CPack script for creating Debian package
# Author: Mathieu Malaterre
#
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index c940dfd..fe30058 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -70,6 +70,19 @@
# during CPack RPM run. For example you may launch CPack like this
# cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Author: Eric Noulard with the help of Alexander Neundorf.
IF(CMAKE_BINARY_DIR)
diff --git a/Modules/CPackZIP.cmake b/Modules/CPackZIP.cmake
index 4a65856..b73bdf1 100644
--- a/Modules/CPackZIP.cmake
+++ b/Modules/CPackZIP.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(CMAKE_BINARY_DIR)
MESSAGE(FATAL_ERROR "CPackZIP.cmake may only be used by CPack internally.")
ENDIF(CMAKE_BINARY_DIR)
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index c13b813..aaa6040 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -9,6 +9,19 @@
# The BUILD_TESTING option is created by the CTest module to determine
# whether testing support should be enabled. The default is ON.
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
OPTION(BUILD_TESTING "Build the testing tree." ON)
# function to turn generator name into a version string
diff --git a/Modules/CTestScriptMode.cmake b/Modules/CTestScriptMode.cmake
index 146bdf1..4a93d23 100644
--- a/Modules/CTestScriptMode.cmake
+++ b/Modules/CTestScriptMode.cmake
@@ -1,5 +1,19 @@
# This file is read by ctest in script mode (-S)
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2009 Alexander Neundorf <neundorf@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Determine the current system, so this information can be used
# in ctest scripts
include(CMakeDetermineSystem)
diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake
index 05ada72..fc47ff8 100644
--- a/Modules/CTestTargets.cmake
+++ b/Modules/CTestTargets.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(NOT RUN_FROM_CTEST_OR_DART)
MESSAGE(FATAL_ERROR "Do not incldue CTestTargets.cmake directly")
ENDIF(NOT RUN_FROM_CTEST_OR_DART)
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index cbde10c..d5d8db9 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -6,11 +6,19 @@
# See help for CheckCSourceCompiles for a listing of variables
# that can modify the build.
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
INCLUDE(CheckCSourceCompiles)
diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index 3c32487..b2768c2 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -11,6 +11,19 @@
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
IF("${VAR}" MATCHES "^${VAR}$")
SET(_FAIL_REGEX)
diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake
index 3bd12e0..50cd028 100644
--- a/Modules/CheckCSourceRuns.cmake
+++ b/Modules/CheckCSourceRuns.cmake
@@ -11,6 +11,19 @@
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
IF("${VAR}" MATCHES "^${VAR}$")
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index 8f1b789..5d22ee5 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -6,11 +6,19 @@
# for CheckCXXSourceCompiles for a listing of variables that can
# modify the build.
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
INCLUDE(CheckCXXSourceCompiles)
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index 458ee6f..5f16607 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -11,6 +11,19 @@
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
IF("${VAR}" MATCHES "^${VAR}$")
SET(_FAIL_REGEX)
diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake
index 50017c3..3a3dafa 100644
--- a/Modules/CheckCXXSourceRuns.cmake
+++ b/Modules/CheckCXXSourceRuns.cmake
@@ -11,6 +11,19 @@
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
IF("${VAR}" MATCHES "^${VAR}$")
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake
index 4985881..0e0f217 100644
--- a/Modules/CheckFortranFunctionExists.cmake
+++ b/Modules/CheckFortranFunctionExists.cmake
@@ -9,6 +9,19 @@
#
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
if(NOT DEFINED ${VARIABLE})
message(STATUS "Looking for Fortran ${FUNCTION}")
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index e319a81..e8fd85d 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -12,6 +12,19 @@
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake
index cfb6921..d1ea76a 100644
--- a/Modules/CheckIncludeFile.cmake
+++ b/Modules/CheckIncludeFile.cmake
@@ -14,6 +14,20 @@
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
#
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
IF(CMAKE_REQUIRED_INCLUDES)
diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake
index 548515b..b1ac62a 100644
--- a/Modules/CheckIncludeFileCXX.cmake
+++ b/Modules/CheckIncludeFileCXX.cmake
@@ -14,6 +14,20 @@
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
#
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
IF(CMAKE_REQUIRED_INCLUDES)
diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake
index bf791e7..21e97dc 100644
--- a/Modules/CheckIncludeFiles.cmake
+++ b/Modules/CheckIncludeFiles.cmake
@@ -12,6 +12,19 @@
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
+#=============================================================================
+# Copyright 2003-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake
index 1e8a6bf..64f6455 100644
--- a/Modules/CheckLibraryExists.cmake
+++ b/Modules/CheckLibraryExists.cmake
@@ -13,6 +13,19 @@
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
diff --git a/Modules/CheckSizeOf.cmake b/Modules/CheckSizeOf.cmake
index 3820d4c..0663ce4 100644
--- a/Modules/CheckSizeOf.cmake
+++ b/Modules/CheckSizeOf.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MESSAGE(SEND_ERROR
"Modules/CheckSizeOf.cmake has been removed. "
"Use Modules/CheckTypeSize.cmake instead. This "
diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake
index f8a7d32..32abe73 100644
--- a/Modules/CheckStructHasMember.cmake
+++ b/Modules/CheckStructHasMember.cmake
@@ -15,6 +15,18 @@
#
# Example: CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC)
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
INCLUDE(CheckCSourceCompiles)
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index 99b8918..d48b65f 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -13,6 +13,19 @@
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+#=============================================================================
+# Copyright 2003-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index cc5dceb..3701467 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -22,6 +22,19 @@
# These variables are referenced in CheckTypeSizeC.c so we have
# to check for them.
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
include(CheckIncludeFile)
MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake
index a6cdc01..13104e5 100644
--- a/Modules/CheckVariableExists.cmake
+++ b/Modules/CheckVariableExists.cmake
@@ -13,6 +13,19 @@
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(MACRO_CHECK_VARIABLE_DEFINITIONS
diff --git a/Modules/Compiler/XL-C.cmake b/Modules/Compiler/XL-C.cmake
index 3120478..8f66557 100644
--- a/Modules/Compiler/XL-C.cmake
+++ b/Modules/Compiler/XL-C.cmake
@@ -1 +1,14 @@
SET(CMAKE_C_VERBOSE_FLAG "-V")
+
+# -qthreaded = Ensures that all optimizations will be thread-safe
+# -qalias=noansi = Turns off type-based aliasing completely (safer optimizer)
+# -qhalt=e = Halt on error messages (rather than just severe errors)
+SET(CMAKE_C_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e")
+
+SET(CMAKE_C_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_C_FLAGS_RELEASE_INIT "-O -DNDEBUG")
+SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
+SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g")
+
+SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/XL-CXX.cmake b/Modules/Compiler/XL-CXX.cmake
index 618ff5a..961cfee 100644
--- a/Modules/Compiler/XL-CXX.cmake
+++ b/Modules/Compiler/XL-CXX.cmake
@@ -1 +1,12 @@
SET(CMAKE_CXX_VERBOSE_FLAG "-V")
+
+SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O -DNDEBUG")
+SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
+
+SET(CMAKE_CXX_COMPILE_OBJECT
+ "<CMAKE_CXX_COMPILER> -+ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+
+SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/XL-Fortran.cmake b/Modules/Compiler/XL-Fortran.cmake
index 49d6bb2..6133f56 100644
--- a/Modules/Compiler/XL-Fortran.cmake
+++ b/Modules/Compiler/XL-Fortran.cmake
@@ -1,2 +1,7 @@
SET(CMAKE_Fortran_VERBOSE_FLAG "-V")
SET(CMAKE_Fortran_DEFINE_FLAG "-WF,-D")
+
+SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
+SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O")
+SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-O")
+SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g")
diff --git a/Modules/Dart.cmake b/Modules/Dart.cmake
index a20deae..f125ceb 100644
--- a/Modules/Dart.cmake
+++ b/Modules/Dart.cmake
@@ -18,6 +18,20 @@
# Section #3: Custom targets for performing dashboard builds.
#
#
+
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
OPTION(BUILD_TESTING "Build the testing tree." ON)
IF(BUILD_TESTING)
diff --git a/Modules/Documentation.cmake b/Modules/Documentation.cmake
index 73998be..ddb19ca 100644
--- a/Modules/Documentation.cmake
+++ b/Modules/Documentation.cmake
@@ -2,6 +2,19 @@
# This file provides support for the VTK documentation framework.
# It relies on several tools (Doxygen, Perl, etc).
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
#
# Build the documentation ?
#
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index aacf0b8..84c7322 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -96,6 +96,18 @@
# Property names correspond to the keyword argument names of
# 'ExternalProject_Add'.
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# Pre-compute a regex to match documented keywords for each command.
file(STRINGS "${CMAKE_CURRENT_LIST_FILE}" lines LIMIT_COUNT 100
@@ -473,13 +485,32 @@ function(_ep_get_build_command name step cmd_var)
endfunction(_ep_get_build_command)
+# This module used to use "/${CMAKE_CFG_INTDIR}" directly and produced
+# makefiles with "/./" in paths for custom command dependencies. Which
+# resulted in problems with parallel make -j invocations.
+#
+# This function was added so that the suffix (search below for ${cfgdir}) is
+# only set to "/${CMAKE_CFG_INTDIR}" when ${CMAKE_CFG_INTDIR} is not going to
+# be "." (multi-configuration build systems like Visual Studio and Xcode...)
+#
+function(_ep_get_configuration_subdir_suffix suffix_var)
+ set(suffix "")
+ if(CMAKE_CONFIGURATION_TYPES)
+ set(suffix "/${CMAKE_CFG_INTDIR}")
+ endif()
+ set(${suffix_var} "${suffix}" PARENT_SCOPE)
+endfunction(_ep_get_configuration_subdir_suffix)
+
+
function(ExternalProject_Add_Step name step)
set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)
ExternalProject_Get_Property(${name} stamp_dir)
+ _ep_get_configuration_subdir_suffix(cfgdir)
+
add_custom_command(APPEND
- OUTPUT ${cmf_dir}/${CMAKE_CFG_INTDIR}/${name}-complete
- DEPENDS ${stamp_dir}/${CMAKE_CFG_INTDIR}/${name}-${step}
+ OUTPUT ${cmf_dir}${cfgdir}/${name}-complete
+ DEPENDS ${stamp_dir}${cfgdir}/${name}-${step}
)
_ep_parse_arguments(ExternalProject_Add_Step
${name} _EP_${step}_ "${ARGN}")
@@ -488,8 +519,8 @@ function(ExternalProject_Add_Step name step)
get_property(dependers TARGET ${name} PROPERTY _EP_${step}_DEPENDERS)
foreach(depender IN LISTS dependers)
add_custom_command(APPEND
- OUTPUT ${stamp_dir}/${CMAKE_CFG_INTDIR}/${name}-${depender}
- DEPENDS ${stamp_dir}/${CMAKE_CFG_INTDIR}/${name}-${step}
+ OUTPUT ${stamp_dir}${cfgdir}/${name}-${depender}
+ DEPENDS ${stamp_dir}${cfgdir}/${name}-${step}
)
endforeach()
@@ -499,7 +530,7 @@ function(ExternalProject_Add_Step name step)
# Dependencies on steps.
get_property(dependees TARGET ${name} PROPERTY _EP_${step}_DEPENDEES)
foreach(dependee IN LISTS dependees)
- list(APPEND depends ${stamp_dir}/${CMAKE_CFG_INTDIR}/${name}-${dependee})
+ list(APPEND depends ${stamp_dir}${cfgdir}/${name}-${dependee})
endforeach()
# The command to run.
@@ -536,14 +567,14 @@ function(ExternalProject_Add_Step name step)
# Run every time?
get_property(always TARGET ${name} PROPERTY _EP_${step}_ALWAYS)
if(always)
- set_property(SOURCE ${stamp_dir}/${CMAKE_CFG_INTDIR}/${name}-${step} PROPERTY SYMBOLIC 1)
+ set_property(SOURCE ${stamp_dir}${cfgdir}/${name}-${step} PROPERTY SYMBOLIC 1)
set(touch)
else()
- set(touch ${CMAKE_COMMAND} -E touch ${stamp_dir}/${CMAKE_CFG_INTDIR}/${name}-${step})
+ set(touch ${CMAKE_COMMAND} -E touch ${stamp_dir}${cfgdir}/${name}-${step})
endif()
add_custom_command(
- OUTPUT ${stamp_dir}/${CMAKE_CFG_INTDIR}/${name}-${step}
+ OUTPUT ${stamp_dir}${cfgdir}/${name}-${step}
COMMENT ${comment}
COMMAND ${command}
COMMAND ${touch}
@@ -557,13 +588,16 @@ endfunction(ExternalProject_Add_Step)
function(_ep_add_mkdir_command name)
ExternalProject_Get_Property(${name}
source_dir binary_dir install_dir stamp_dir download_dir tmp_dir)
+
+ _ep_get_configuration_subdir_suffix(cfgdir)
+
ExternalProject_Add_Step(${name} mkdir
COMMENT "Creating directories for '${name}'"
COMMAND ${CMAKE_COMMAND} -E make_directory ${source_dir}
COMMAND ${CMAKE_COMMAND} -E make_directory ${binary_dir}
COMMAND ${CMAKE_COMMAND} -E make_directory ${install_dir}
COMMAND ${CMAKE_COMMAND} -E make_directory ${tmp_dir}
- COMMAND ${CMAKE_COMMAND} -E make_directory ${stamp_dir}/${CMAKE_CFG_INTDIR}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${stamp_dir}${cfgdir}
COMMAND ${CMAKE_COMMAND} -E make_directory ${download_dir}
)
endfunction(_ep_add_mkdir_command)
@@ -754,12 +788,14 @@ endfunction(_ep_add_patch_command)
function(_ep_add_configure_command name)
ExternalProject_Get_Property(${name} source_dir binary_dir)
+ _ep_get_configuration_subdir_suffix(cfgdir)
+
# Depend on other external projects (file-level).
set(file_deps)
get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
foreach(dep IN LISTS deps)
get_property(dep_stamp_dir TARGET ${dep} PROPERTY _EP_STAMP_DIR)
- list(APPEND file_deps ${dep_stamp_dir}/${CMAKE_CFG_INTDIR}/${dep}-done)
+ list(APPEND file_deps ${dep_stamp_dir}${cfgdir}/${dep}-done)
endforeach()
get_property(cmd_set TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND SET)
@@ -862,9 +898,11 @@ endfunction(_ep_add_test_command)
function(ExternalProject_Add name)
+ _ep_get_configuration_subdir_suffix(cfgdir)
+
# Add a custom target for the external project.
set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)
- add_custom_target(${name} ALL DEPENDS ${cmf_dir}/${CMAKE_CFG_INTDIR}/${name}-complete)
+ add_custom_target(${name} ALL DEPENDS ${cmf_dir}${cfgdir}/${name}-complete)
set_property(TARGET ${name} PROPERTY _EP_IS_EXTERNAL_PROJECT 1)
_ep_parse_arguments(ExternalProject_Add ${name} _EP_ "${ARGN}")
_ep_set_directories(${name})
@@ -877,12 +915,12 @@ function(ExternalProject_Add name)
# custom command so that CMake does not propagate build rules to
# other external project targets.
add_custom_command(
- OUTPUT ${cmf_dir}/${CMAKE_CFG_INTDIR}/${name}-complete
+ OUTPUT ${cmf_dir}${cfgdir}/${name}-complete
COMMENT "Completed '${name}'"
- COMMAND ${CMAKE_COMMAND} -E make_directory ${cmf_dir}/${CMAKE_CFG_INTDIR}
- COMMAND ${CMAKE_COMMAND} -E touch ${cmf_dir}/${CMAKE_CFG_INTDIR}/${name}-complete
- COMMAND ${CMAKE_COMMAND} -E touch ${stamp_dir}/${CMAKE_CFG_INTDIR}/${name}-done
- DEPENDS ${stamp_dir}/${CMAKE_CFG_INTDIR}/${name}-install
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${cmf_dir}${cfgdir}
+ COMMAND ${CMAKE_COMMAND} -E touch ${cmf_dir}${cfgdir}/${name}-complete
+ COMMAND ${CMAKE_COMMAND} -E touch ${stamp_dir}${cfgdir}/${name}-done
+ DEPENDS ${stamp_dir}${cfgdir}/${name}-install
VERBATIM
)
diff --git a/Modules/FLTKCompatibility.cmake b/Modules/FLTKCompatibility.cmake
index 0a42260..77ca47b 100644
--- a/Modules/FLTKCompatibility.cmake
+++ b/Modules/FLTKCompatibility.cmake
@@ -1 +1,15 @@
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(CheckIncludeFile)
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index f2aff47..5373852 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -19,6 +19,18 @@
# "http://xmlsoft.org/")
#
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
MACRO(SET_FEATURE_INFO _name _desc)
SET(_url "${ARGV2}")
diff --git a/Modules/FindALSA.cmake b/Modules/FindALSA.cmake
index 3a84650..7deefaf 100644
--- a/Modules/FindALSA.cmake
+++ b/Modules/FindALSA.cmake
@@ -10,6 +10,20 @@
# ALSA_LIBRARY - the asound library
#
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2009 Philip Lowman <philip@yhbt.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
find_path(ALSA_INCLUDE_DIR NAMES asoundlib.h
PATH_SUFFIXES alsa
DOC "The ALSA (asound) include directory"
diff --git a/Modules/FindASPELL.cmake b/Modules/FindASPELL.cmake
index d43ea9d..c11c2e3 100644
--- a/Modules/FindASPELL.cmake
+++ b/Modules/FindASPELL.cmake
@@ -6,11 +6,19 @@
# ASPELL_LIBRARIES - The libraries needed to use ASPELL
# ASPELL_DEFINITIONS - Compiler switches required for using ASPELL
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
IF (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
# Already in cache, be silent
diff --git a/Modules/FindAVIFile.cmake b/Modules/FindAVIFile.cmake
index 390d793..ff140f6 100644
--- a/Modules/FindAVIFile.cmake
+++ b/Modules/FindAVIFile.cmake
@@ -9,6 +9,19 @@
# AVIFILE_DEFINITIONS, definitions to use when compiling
# AVIFILE_FOUND, If false, don't try to use AVIFILE
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF (UNIX)
FIND_PATH(AVIFILE_INCLUDE_DIR avifile.h
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index 22cf6e3..fbee50a 100644
--- a/Modules/FindBISON.cmake
+++ b/Modules/FindBISON.cmake
@@ -1,167 +1,154 @@
-# - Find bison executable and provides macros to generate custom build rules
-# The module defines the following variables:
-#
-# BISON_EXECUTABLE - path to the bison program
-# BISON_VERSION - version of bison
-# BISON_FOUND - true if the program was found
-#
-# If bison is found, the module defines the macros:
-# BISON_TARGET(<Name> <YaccInput> <CodeOutput> [VERBOSE <file>]
-# [COMPILE_FLAGS <string>])
-# which will create a custom rule to generate a parser. <YaccInput> is
-# the path to a yacc file. <CodeOutput> is the name of the source file
-# generated by bison. A header file is also be generated, and contains
-# the token list. If COMPILE_FLAGS option is specified, the next
-# parameter is added in the bison command line. if VERBOSE option is
-# specified, <file> is created and contains verbose descriptions of the
-# grammar and parser. The macro defines a set of variables:
-# BISON_${Name}_DEFINED - true is the macro ran successfully
-# BISON_${Name}_INPUT - The input source file, an alias for <YaccInput>
-# BISON_${Name}_OUTPUT_SOURCE - The source file generated by bison
-# BISON_${Name}_OUTPUT_HEADER - The header file generated by bison
-# BISON_${Name}_OUTPUTS - The sources files generated by bison
-# BISON_${Name}_COMPILE_FLAGS - Options used in the bison command line
-#
-#====================================================================
-# Example:
-#
-# find_package(BISON)
-# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
-# add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
-#====================================================================
-
-# Copyright (c) 2006, Tristan Carel
-# All rights reserved.
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the University of California, Berkeley nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# $Id$
-
-FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
-MARK_AS_ADVANCED(BISON_EXECUTABLE)
-
-IF(BISON_EXECUTABLE)
-
- EXECUTE_PROCESS(COMMAND ${BISON_EXECUTABLE} --version
- OUTPUT_VARIABLE BISON_version_output
- ERROR_VARIABLE BISON_version_error
- RESULT_VARIABLE BISON_version_result
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- IF(NOT ${BISON_version_result} EQUAL 0)
- MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
- ELSE()
- STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
- BISON_VERSION "${BISON_version_output}")
- ENDIF()
-
- # internal macro
- MACRO(BISON_TARGET_option_verbose Name BisonOutput filename)
- LIST(APPEND BISON_TARGET_cmdopt "--verbose")
- GET_FILENAME_COMPONENT(BISON_TARGET_output_path "${BisonOutput}" PATH)
- GET_FILENAME_COMPONENT(BISON_TARGET_output_name "${BisonOutput}" NAME_WE)
- ADD_CUSTOM_COMMAND(OUTPUT ${filename}
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy
- "${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output"
- "${filename}"
- DEPENDS
- "${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output"
- COMMENT "[BISON][${Name}] Copying bison verbose table to ${filename}"
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
- SET(BISON_${Name}_VERBOSE_FILE ${filename})
- LIST(APPEND BISON_TARGET_extraoutputs
- "${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output")
- ENDMACRO(BISON_TARGET_option_verbose)
-
- # internal macro
- MACRO(BISON_TARGET_option_extraopts Options)
- SET(BISON_TARGET_extraopts "${Options}")
- SEPARATE_ARGUMENTS(BISON_TARGET_extraopts)
- LIST(APPEND BISON_TARGET_cmdopt ${BISON_TARGET_extraopts})
- ENDMACRO(BISON_TARGET_option_extraopts)
-
- #============================================================
- # BISON_TARGET (public macro)
- #============================================================
- #
- MACRO(BISON_TARGET Name BisonInput BisonOutput)
- SET(BISON_TARGET_output_header "")
- SET(BISON_TARGET_command_opt "")
- SET(BISON_TARGET_outputs "${BisonOutput}")
- IF(NOT ${ARGC} EQUAL 3 AND NOT ${ARGC} EQUAL 5 AND NOT ${ARGC} EQUAL 7)
- MESSAGE(SEND_ERROR "Usage")
- ELSE()
- # Parsing parameters
- IF(${ARGC} GREATER 5 OR ${ARGC} EQUAL 5)
- IF("${ARGV3}" STREQUAL "VERBOSE")
- BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV4}")
- ENDIF()
- IF("${ARGV3}" STREQUAL "COMPILE_FLAGS")
- BISON_TARGET_option_extraopts("${ARGV4}")
- ENDIF()
- ENDIF()
-
- IF(${ARGC} EQUAL 7)
- IF("${ARGV5}" STREQUAL "VERBOSE")
- BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV6}")
- ENDIF()
-
- IF("${ARGV5}" STREQUAL "COMPILE_FLAGS")
- BISON_TARGET_option_extraopts("${ARGV6}")
- ENDIF()
- ENDIF()
-
- # Header's name generated by bison (see option -d)
- LIST(APPEND BISON_TARGET_cmdopt "-d")
- STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${ARGV2}")
- STRING(REPLACE "c" "h" _fileext ${_fileext})
- STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
- BISON_${Name}_OUTPUT_HEADER "${ARGV2}")
- LIST(APPEND BISON_TARGET_outputs "${BISON_${Name}_OUTPUT_HEADER}")
-
- ADD_CUSTOM_COMMAND(OUTPUT ${BISON_TARGET_outputs}
- ${BISON_TARGET_extraoutputs}
- COMMAND ${BISON_EXECUTABLE}
- ARGS ${BISON_TARGET_cmdopt} -o ${ARGV2} ${ARGV1}
- DEPENDS ${ARGV1}
- COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
- # define target variables
- SET(BISON_${Name}_DEFINED TRUE)
- SET(BISON_${Name}_INPUT ${ARGV1})
- SET(BISON_${Name}_OUTPUTS ${BISON_TARGET_outputs})
- SET(BISON_${Name}_COMPILE_FLAGS ${BISON_TARGET_cmdopt})
- SET(BISON_${Name}_OUTPUT_SOURCE "${BisonOutput}")
-
- ENDIF(NOT ${ARGC} EQUAL 3 AND NOT ${ARGC} EQUAL 5 AND NOT ${ARGC} EQUAL 7)
- ENDMACRO(BISON_TARGET)
- #
- #============================================================
-
-ENDIF(BISON_EXECUTABLE)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON DEFAULT_MSG BISON_EXECUTABLE)
-
-# FindBISON.cmake ends here
+# - Find bison executable and provides macros to generate custom build rules
+# The module defines the following variables:
+#
+# BISON_EXECUTABLE - path to the bison program
+# BISON_VERSION - version of bison
+# BISON_FOUND - true if the program was found
+#
+# If bison is found, the module defines the macros:
+# BISON_TARGET(<Name> <YaccInput> <CodeOutput> [VERBOSE <file>]
+# [COMPILE_FLAGS <string>])
+# which will create a custom rule to generate a parser. <YaccInput> is
+# the path to a yacc file. <CodeOutput> is the name of the source file
+# generated by bison. A header file is also be generated, and contains
+# the token list. If COMPILE_FLAGS option is specified, the next
+# parameter is added in the bison command line. if VERBOSE option is
+# specified, <file> is created and contains verbose descriptions of the
+# grammar and parser. The macro defines a set of variables:
+# BISON_${Name}_DEFINED - true is the macro ran successfully
+# BISON_${Name}_INPUT - The input source file, an alias for <YaccInput>
+# BISON_${Name}_OUTPUT_SOURCE - The source file generated by bison
+# BISON_${Name}_OUTPUT_HEADER - The header file generated by bison
+# BISON_${Name}_OUTPUTS - The sources files generated by bison
+# BISON_${Name}_COMPILE_FLAGS - Options used in the bison command line
+#
+#====================================================================
+# Example:
+#
+# find_package(BISON)
+# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
+# add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
+#====================================================================
+
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2006 Tristan Carel
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
+MARK_AS_ADVANCED(BISON_EXECUTABLE)
+
+IF(BISON_EXECUTABLE)
+
+ EXECUTE_PROCESS(COMMAND ${BISON_EXECUTABLE} --version
+ OUTPUT_VARIABLE BISON_version_output
+ ERROR_VARIABLE BISON_version_error
+ RESULT_VARIABLE BISON_version_result
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ IF(NOT ${BISON_version_result} EQUAL 0)
+ MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
+ ELSE()
+ STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
+ BISON_VERSION "${BISON_version_output}")
+ ENDIF()
+
+ # internal macro
+ MACRO(BISON_TARGET_option_verbose Name BisonOutput filename)
+ LIST(APPEND BISON_TARGET_cmdopt "--verbose")
+ GET_FILENAME_COMPONENT(BISON_TARGET_output_path "${BisonOutput}" PATH)
+ GET_FILENAME_COMPONENT(BISON_TARGET_output_name "${BisonOutput}" NAME_WE)
+ ADD_CUSTOM_COMMAND(OUTPUT ${filename}
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy
+ "${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output"
+ "${filename}"
+ DEPENDS
+ "${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output"
+ COMMENT "[BISON][${Name}] Copying bison verbose table to ${filename}"
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+ SET(BISON_${Name}_VERBOSE_FILE ${filename})
+ LIST(APPEND BISON_TARGET_extraoutputs
+ "${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output")
+ ENDMACRO(BISON_TARGET_option_verbose)
+
+ # internal macro
+ MACRO(BISON_TARGET_option_extraopts Options)
+ SET(BISON_TARGET_extraopts "${Options}")
+ SEPARATE_ARGUMENTS(BISON_TARGET_extraopts)
+ LIST(APPEND BISON_TARGET_cmdopt ${BISON_TARGET_extraopts})
+ ENDMACRO(BISON_TARGET_option_extraopts)
+
+ #============================================================
+ # BISON_TARGET (public macro)
+ #============================================================
+ #
+ MACRO(BISON_TARGET Name BisonInput BisonOutput)
+ SET(BISON_TARGET_output_header "")
+ SET(BISON_TARGET_command_opt "")
+ SET(BISON_TARGET_outputs "${BisonOutput}")
+ IF(NOT ${ARGC} EQUAL 3 AND NOT ${ARGC} EQUAL 5 AND NOT ${ARGC} EQUAL 7)
+ MESSAGE(SEND_ERROR "Usage")
+ ELSE()
+ # Parsing parameters
+ IF(${ARGC} GREATER 5 OR ${ARGC} EQUAL 5)
+ IF("${ARGV3}" STREQUAL "VERBOSE")
+ BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV4}")
+ ENDIF()
+ IF("${ARGV3}" STREQUAL "COMPILE_FLAGS")
+ BISON_TARGET_option_extraopts("${ARGV4}")
+ ENDIF()
+ ENDIF()
+
+ IF(${ARGC} EQUAL 7)
+ IF("${ARGV5}" STREQUAL "VERBOSE")
+ BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV6}")
+ ENDIF()
+
+ IF("${ARGV5}" STREQUAL "COMPILE_FLAGS")
+ BISON_TARGET_option_extraopts("${ARGV6}")
+ ENDIF()
+ ENDIF()
+
+ # Header's name generated by bison (see option -d)
+ LIST(APPEND BISON_TARGET_cmdopt "-d")
+ STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${ARGV2}")
+ STRING(REPLACE "c" "h" _fileext ${_fileext})
+ STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
+ BISON_${Name}_OUTPUT_HEADER "${ARGV2}")
+ LIST(APPEND BISON_TARGET_outputs "${BISON_${Name}_OUTPUT_HEADER}")
+
+ ADD_CUSTOM_COMMAND(OUTPUT ${BISON_TARGET_outputs}
+ ${BISON_TARGET_extraoutputs}
+ COMMAND ${BISON_EXECUTABLE}
+ ARGS ${BISON_TARGET_cmdopt} -o ${ARGV2} ${ARGV1}
+ DEPENDS ${ARGV1}
+ COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+
+ # define target variables
+ SET(BISON_${Name}_DEFINED TRUE)
+ SET(BISON_${Name}_INPUT ${ARGV1})
+ SET(BISON_${Name}_OUTPUTS ${BISON_TARGET_outputs})
+ SET(BISON_${Name}_COMPILE_FLAGS ${BISON_TARGET_cmdopt})
+ SET(BISON_${Name}_OUTPUT_SOURCE "${BisonOutput}")
+
+ ENDIF(NOT ${ARGC} EQUAL 3 AND NOT ${ARGC} EQUAL 5 AND NOT ${ARGC} EQUAL 7)
+ ENDMACRO(BISON_TARGET)
+ #
+ #============================================================
+
+ENDIF(BISON_EXECUTABLE)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON DEFAULT_MSG BISON_EXECUTABLE)
+
+# FindBISON.cmake ends here
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 300ebee..be41736 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -25,6 +25,20 @@
## ATLAS, PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model),
## Intel( older versions of mkl 32 and 64 bit), ACML,Apple, NAS, Generic
# C/CXX should be enabled to use Intel mkl
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
if(NOT _LANGUAGES_ MATCHES Fortran)
if(BLAS_FIND_REQUIRED)
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake
index 5842038..c969e43 100644
--- a/Modules/FindBZip2.cmake
+++ b/Modules/FindBZip2.cmake
@@ -7,11 +7,19 @@
# BZIP2_DEFINITIONS - Compiler switches required for using BZip2
# BZIP2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
IF (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES)
SET(BZip2_FIND_QUIETLY TRUE)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 6084a60..93d4683 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -147,21 +147,23 @@
# Boost_${COMPONENT}_LIBRARY Contains the libraries for the specified Boost
# "component" (includes debug and optimized keywords
# when needed).
-#
-# =====================================================================
-#
-#
-# Copyright (c) 2006-2008 Andreas Schneider <mail@cynapses.org>
-# Copyright (c) 2007 Wengo
-# Copyright (c) 2007 Mike Jackson
-# Copyright (c) 2008 Andreas Pakulat <apaku@gmx.de>
-#
-# Redistribution AND use is allowed according to the terms of the New
-# BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
-
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006-2008 Andreas Schneider <mail@cynapses.org>
+# Copyright 2007 Wengo
+# Copyright 2007 Mike Jackson
+# Copyright 2008 Andreas Pakulat <apaku@gmx.de>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
#-------------------------------------------------------------------------------
# FindBoost functions & macros
diff --git a/Modules/FindBullet.cmake b/Modules/FindBullet.cmake
index 118efb6..fe58f60 100644
--- a/Modules/FindBullet.cmake
+++ b/Modules/FindBullet.cmake
@@ -1,75 +1,83 @@
-# - Try to find the Bullet physics engine
-#
-# This module defines the following variables
-#
-# BULLET_FOUND - Was bullet found
-# BULLET_INCLUDE_DIRS - the Bullet include directories
-# BULLET_LIBRARIES - Link to this, by default it includes
-# all bullet components (Dynamics,
-# Collision, LinearMath, & SoftBody)
-#
-# This module accepts the following variables
-#
-# BULLET_ROOT - Can be set to bullet install path or Windows build path
-#
-
-# Copyright (c) 2009, Philip Lowman <philip@yhbt.com>
-#
-# Redistribution AND use is allowed according to the terms of the New
-# BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-macro(_FIND_BULLET_LIBRARY _var)
- find_library(${_var}
- NAMES
- ${ARGN}
- PATHS
- ${BULLET_ROOT}
- ${BULLET_ROOT}/out/release8/libs
- ${BULLET_ROOT}/out/debug8/libs
- PATH_SUFFIXES lib
- )
- mark_as_advanced(${_var})
-endmacro()
-
-macro(_BULLET_APPEND_LIBRARIES _list _release)
- set(_debug ${_release}_DEBUG)
- if(${_debug})
- set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}})
- else()
- set(${_list} ${${_list}} ${${_release}})
- endif()
-endmacro()
-
-find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h
- PATHS
- ${BULLET_ROOT}/include
- ${BULLET_ROOT}/src
-)
-
-# Find the libraries
-
-_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY BulletDynamics)
-_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_d)
-_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision)
-_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_d)
-_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY LinearMath BulletMath)
-_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG LinearMath_d BulletMath_d)
-_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody)
-_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_d)
-
-
-# handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if
-# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Bullet DEFAULT_MSG
- BULLET_DYNAMICS_LIBRARY BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY
- BULLET_SOFTBODY_LIBRARY BULLET_INCLUDE_DIR)
-
-set(BULLET_INCLUDE_DIRS ${BULLET_INCLUDE_DIR})
-if(BULLET_FOUND)
- _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_DYNAMICS_LIBRARY)
- _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_COLLISION_LIBRARY)
- _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_MATH_LIBRARY)
- _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_SOFTBODY_LIBRARY)
-endif()
+# - Try to find the Bullet physics engine
+#
+# This module defines the following variables
+#
+# BULLET_FOUND - Was bullet found
+# BULLET_INCLUDE_DIRS - the Bullet include directories
+# BULLET_LIBRARIES - Link to this, by default it includes
+# all bullet components (Dynamics,
+# Collision, LinearMath, & SoftBody)
+#
+# This module accepts the following variables
+#
+# BULLET_ROOT - Can be set to bullet install path or Windows build path
+#
+
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2009 Philip Lowman <philip@yhbt.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+macro(_FIND_BULLET_LIBRARY _var)
+ find_library(${_var}
+ NAMES
+ ${ARGN}
+ PATHS
+ ${BULLET_ROOT}
+ ${BULLET_ROOT}/out/release8/libs
+ ${BULLET_ROOT}/out/debug8/libs
+ PATH_SUFFIXES lib
+ )
+ mark_as_advanced(${_var})
+endmacro()
+
+macro(_BULLET_APPEND_LIBRARIES _list _release)
+ set(_debug ${_release}_DEBUG)
+ if(${_debug})
+ set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}})
+ else()
+ set(${_list} ${${_list}} ${${_release}})
+ endif()
+endmacro()
+
+find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h
+ PATHS
+ ${BULLET_ROOT}/include
+ ${BULLET_ROOT}/src
+)
+
+# Find the libraries
+
+_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY BulletDynamics)
+_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_d)
+_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision)
+_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_d)
+_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY LinearMath BulletMath)
+_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG LinearMath_d BulletMath_d)
+_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody)
+_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_d)
+
+
+# handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if
+# all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Bullet DEFAULT_MSG
+ BULLET_DYNAMICS_LIBRARY BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY
+ BULLET_SOFTBODY_LIBRARY BULLET_INCLUDE_DIR)
+
+set(BULLET_INCLUDE_DIRS ${BULLET_INCLUDE_DIR})
+if(BULLET_FOUND)
+ _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_DYNAMICS_LIBRARY)
+ _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_COLLISION_LIBRARY)
+ _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_MATH_LIBRARY)
+ _BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_SOFTBODY_LIBRARY)
+endif()
diff --git a/Modules/FindCABLE.cmake b/Modules/FindCABLE.cmake
index 5bcbc67..938c805 100644
--- a/Modules/FindCABLE.cmake
+++ b/Modules/FindCABLE.cmake
@@ -10,6 +10,19 @@
# ${CABLE_TCL_LIBRARY}. You should also add ${CABLE_INCLUDE_DIR} as
# an include directory.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(NOT CABLE)
FIND_PATH(CABLE_BUILD_DIR cableVersion.h)
ENDIF(NOT CABLE)
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index e35056f..f615e0d 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -1,1173 +1,1225 @@
-# - Tools for building CUDA C files: libraries and build dependencies.
-# This script locates the Nvidia Compute Unified Driver Architecture (CUDA)
-# tools. It should work on linux, windows, and mac and should be reasonably
-# up to date with cuda releases.
-#
-# This script makes use of the standard find_package arguments of <VERSION>,
-# REQUIRED and QUIET. CUDA_FOUND will report if an acceptable version of CUDA
-# was found.
-#
-# The script will prompt the user to specify CUDA_TOOLKIT_ROOT_DIR if the prefix
-# cannot be determined by the location of nvcc in the system path and REQUIRED
-# is specified to find_package(). To use a different installed version of the
-# toolkit set the environment variable CUDA_BIN_PATH before running cmake
-# (e.g. CUDA_BIN_PATH=/usr/local/cuda1.0 instead of the default
-# /usr/local/cuda) or set CUDA_TOOLKIT_ROOT_DIR after configuring.
-#
-# It might be necessary to set CUDA_TOOLKIT_ROOT_DIR manually on certain
-# platforms, or to use a cuda runtime not installed in the default location. In
-# newer versions of the toolkit the cuda library is included with the graphics
-# driver- be sure that the driver version matches what is needed by the cuda
-# runtime version.
-#
-# Set CUDA_BUILD_EMULATION to ON for Emulation mode. Defaults to OFF (device
-# mode). -D_DEVICEEMU is defined for CUDA C files when CUDA_BUILD_EMULATION is
-# TRUE.
-#
-# Set CUDA_HOST_COMPILATION_CPP to OFF for C compilation of host code. Default
-# TRUE.
-#
-# Set CUDA_BUILD_CUBIN to "ON" or "OFF" to enable and extra compilation pass
-# with the -cubin option in Device mode. The output is parsed and register,
-# shared memory usage is printed during build. Default OFF.
-#
-# Set CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE to ON if you want the custom build
-# rule to be attached to the source file in Visual Studio. Defaults to ON.
-# Turn OFF if you add the same cuda file to multiple targets.
-#
-# This allows the user to build the target from the CUDA file, however bad
-# things can happen if the CUDA source file is added to multiple targets. When
-# performing parallel builds it is possible for the custom build command to be
-# run more than once and in parallel causing cryptic build errors. This is
-# because VS runs the rules for every source file in the target, and a source
-# can have only one rule no matter how many projects it is added to. Therefore,
-# the rule assigned to the source file really only applies to one target you get
-# clashes when it is run from multiple targets. Eventually everything will get
-# built, but if the user is unaware of this behavior, there may be confusion.
-# It would be nice if we could detect the reuse of source files across multiple
-# targets and turn the option off for the user, but no good solution could be
-# found.
-#
-# Set CUDA_64_BIT_DEVICE_CODE to ON to compile for 64 bit devices. Defaults to
-# match host bit size. Note that making this different than the host code when
-# generating C files from CUDA code just won't work, because size_t gets defined
-# by nvcc in the generated source. If you compile to PTX and then load the file
-# yourself, you can mix bit sizes between device and host.
-#
-# Set CUDA_VERBOSE_BUILD to ON to see all the commands used when building the
-# CUDA file. When using a Makefile generator the value defaults to VERBOSE (run
-# make VERBOSE=1 to see output). You can override this by setting
-# CUDA_VERBOSE_BUILD to ON.
-#
-# Set CUDA_GENERATED_OUTPUT_DIR to the path you wish to have the generated files
-# placed. If it is blank output files will be placed in
-# CMAKE_CURRENT_BINARY_DIR. Intermediate files will always be placed in
-# CMAKE_CURRENT_BINARY_DIR.
-#
-# The script creates the following macros:
-#
-# CUDA_INCLUDE_DIRECTORIES( path0 path1 ... )
-# -- Sets the directories that should be passed to nvcc
-# (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu
-# files.
-#
-# CUDA_ADD_LIBRARY( cuda_target file0 file1 ...
-# [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
-# -- Creates a shared library "cuda_target" which contains all of the source
-# (*.c, *.cc, etc.) specified and all of the nvcc'ed .cu files specified.
-# All of the specified source files and generated .cpp files are compiled
-# using the standard CMake compiler, so the normal INCLUDE_DIRECTORIES,
-# LINK_DIRECTORIES, and TARGET_LINK_LIBRARIES can be used to affect their
-# build and link. In addition CUDA_INCLUDE_DIRS is added automatically
-# added to include_directories().
-#
-# CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ...
-# [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
-# -- Same as CUDA_ADD_LIBRARY except that an exectuable is created.
-#
-# CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE]
-# [OPTIONS ...] )
-# -- Returns a list of generated files from the input source files to be used
-# with ADD_LIBRARY or ADD_EXECUTABLE.
-#
-# CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] )
-# -- Returns a list of PTX files generated from the input source files.
-#
-# CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ...
-# [STATIC | SHARED | MODULE] [OPTIONS ...] )
-# -- This is where all the magic happens. CUDA_ADD_EXECUTABLE,
-# CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this
-# function under the hood.
-#
-# Given the list of files (file0 file1 ... fileN) this macro generates
-# custom commands that generate either PTX or linkable objects (use "PTX" or
-# "OBJ" for the format argument to switch. Files that don't end with .cu or
-# have the HEADER_FILE_ONLY property are ignored.
-#
-# The arguments passed in after OPTIONS are extra command line options to
-# give to NVCC. You can also specify per configuration options by
-# specifying the name of the configuration followed by the options. General
-# options must preceed configuration specific options. Not all
-# configurations need to be specified, only the ones provided will be used.
-#
-# OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag"
-# DEBUG -g
-# RELEASE --use_fast_math
-# RELWITHDEBINFO --use_fast_math;-g
-# MINSIZEREL --use_fast_math
-#
-# For certain configurations (namely VS generating object files with
-# CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will
-# be produced for the given cuda file. This is because when you add the
-# cuda file to Visual Studio it knows that this file produces and will link
-# in the resulting object file automatically.
-#
-# This script also looks at optional arguments STATIC, SHARED, or MODULE to
-# override the behavior specified by the value of the CMake variable
-# BUILD_SHARED_LIBS. See BUILD_SHARED_LIBS below for more details.
-#
-# This script will also generate a separate cmake script that is used at
-# build time to invoke nvcc. This is for serveral reasons.
-#
-# 1. nvcc can return negative numbers as return values which confuses
-# Visual Studio into thinking that the command succeeded. The script now
-# checks the error codes and produces errors when there was a problem
-#
-# 2. nvcc has been known to not delete intermediate results when it
-# encounters problems. The build rules then don't complete, because there
-# exists a partially written output file. The script now deletes the
-# output files if there was an error.
-#
-# 3. By putting all the options that affect the build into a file and then
-# make the build rule dependent on the file, when the options change the
-# output files will be regenerated.
-#
-# CUDA_ADD_CUFFT_TO_TARGET( cuda_target )
-# -- Adds the cufft library to the target. Handles whether you are in
-# emulation mode or not.
-#
-# CUDA_ADD_CUBLAS_TO_TARGET( cuda_target )
-# -- Adds the cublas library to the target. Handles whether you are in
-# emulation mode or not.
-#
-# CUDA_BUILD_CLEAN_TARGET()
-# -- Creates a convience target that deletes all the dependency files
-# generated. You should make clean after running this target to ensure the
-# dependency files get regenerated.
-#
-# The script defines the following variables:
-#
-# ( Note CUDA_ADD_* macros setup cuda/cut library dependencies automatically.
-# These variables are only needed if a cuda API call must be made from code in
-# a outside library or executable. )
-#
-# CUDA_VERSION_MAJOR -- The major version of cuda as reported by nvcc.
-# CUDA_VERSION_MINOR -- The minor version.
-# CUDA_VERSION
-# CUDA_VERSION_STRING -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR
-#
-# CUDA_INCLUDE_DIRS -- Include directory for cuda headers. Added automatically
-# for CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY.
-# CUDA_LIBRARIES -- Cuda RT library.
-# CUDA_CUT_INCLUDE_DIR -- Include directory for cuda SDK headers (cutil.h).
-# CUDA_CUT_LIBRARIES -- SDK libraries.
-# CUDA_NVCC_FLAGS -- Additional NVCC command line arguments. NOTE:
-# multiple arguments must be semi-colon delimited
-# e.g. --compiler-options;-Wall
-# CUDA_NVCC_FLAGS_<CONFIG> -- Confugration specific flags for NVCC.
-# CUDA_CUFFT_LIBRARIES -- Device or emulation library for the Cuda FFT
-# implementation (alternative to:
-# CUDA_ADD_CUFFT_TO_TARGET macro)
-# CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS
-# implementation (alterative to:
-# CUDA_ADD_CUBLAS_TO_TARGET macro).
-#
-#
-# The script generates object files by default. In order to facilitate this,
-# the script makes use of the CMAKE_{C,CXX}_FLAGS along with their configuration
-# dependent counterparts (i.e. CMAKE_C_FLAGS_DEBUG). These flags are passed
-# through nvcc to the native compiler. In addition, on some systems special
-# flags are added for building objects intended for shared libraries. FindCUDA
-# make use of the CMake variable BUILD_SHARED_LIBS and the usual STATIC, SHARED,
-# and MODULE arguments to determine if these flags should be used. Please set
-# BUILD_SHARED_LIBS or pass in STATIC, SHARED, or MODULE according to how the
-# objects are to be used before calling CUDA_ADD_LIBRARY. A preprocessor macro,
-# <target_name>_EXPORTS is defined when BUILD_SHARED_LIBS is defined. In
-# addition, flags passed into add_definitions with -D or /D are passed along to
-# nvcc.
-#
-# Files with the HEADER_FILE_ONLY property set will not be compiled.
-#
-# James Bigler, NVIDIA Corp
-# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
-#
-# Copyright (c) 2008-2009
-# NVIDIA Corp.
-#
-# Copyright (c) 2007-2009
-# Scientific Computing and Imaging Institute, University of Utah
-#
-# This code is licensed under the MIT License. See the FindCUDA.cmake script
-# for the text of the license.
-
-# The MIT License
-#
-# License for the specific language governing rights and limitations under
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-#
-###############################################################################
-
-# FindCUDA.cmake
-
-# We need to have at least this version to support the VERSION_LESS argument to 'if' (2.6.2) and unset (2.6.3)
-cmake_policy(PUSH)
-cmake_minimum_required(VERSION 2.6.3)
-cmake_policy(POP)
-
-# This macro helps us find the location of helper files we will need the full path to
-macro(CUDA_FIND_HELPER_FILE _name _extension)
- set(_full_name "${_name}.${_extension}")
- # CMAKE_CURRENT_LIST_FILE contains the full path to the file currently being
- # processed. Using this variable, we can pull out the current path, and
- # provide a way to get access to the other files we need local to here.
- get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
- find_file(CUDA_${_name} ${_full_name} PATHS ${CMAKE_CURRENT_LIST_DIR}/FindCUDA NO_DEFAULT_PATH)
- if(NOT CUDA_${_name})
- set(error_message "${_full_name} not found in CMAKE_MODULE_PATH")
- if(CUDA_FIND_REQUIRED)
- message(FATAL_ERROR "${error_message}")
- else(CUDA_FIND_REQUIRED)
- if(NOT CUDA_FIND_QUIETLY)
- message(STATUS "${error_message}")
- endif(NOT CUDA_FIND_QUIETLY)
- endif(CUDA_FIND_REQUIRED)
- endif(NOT CUDA_${_name})
- # Set this variable as internal, so the user isn't bugged with it.
- set(CUDA_${_name} ${CUDA_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE)
-endmacro(CUDA_FIND_HELPER_FILE)
-
-#####################################################################
-## CUDA_INCLUDE_NVCC_DEPENDENCIES
-##
-
-# So we want to try and include the dependency file if it exists. If
-# it doesn't exist then we need to create an empty one, so we can
-# include it.
-
-# If it does exist, then we need to check to see if all the files it
-# depends on exist. If they don't then we should clear the dependency
-# file and regenerate it later. This covers the case where a header
-# file has disappeared or moved.
-
-macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file)
- set(CUDA_NVCC_DEPEND)
- set(CUDA_NVCC_DEPEND_REGENERATE FALSE)
-
-
- # Include the dependency file. Create it first if it doesn't exist . The
- # INCLUDE puts a dependency that will force CMake to rerun and bring in the
- # new info when it changes. DO NOT REMOVE THIS (as I did and spent a few
- # hours figuring out why it didn't work.
- if(NOT EXISTS ${dependency_file})
- file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n")
- endif()
- # Always include this file to force CMake to run again next
- # invocation and rebuild the dependencies.
- #message("including dependency_file = ${dependency_file}")
- include(${dependency_file})
-
- # Now we need to verify the existence of all the included files
- # here. If they aren't there we need to just blank this variable and
- # make the file regenerate again.
-# if(DEFINED CUDA_NVCC_DEPEND)
-# message("CUDA_NVCC_DEPEND set")
-# else()
-# message("CUDA_NVCC_DEPEND NOT set")
-# endif()
- if(CUDA_NVCC_DEPEND)
- #message("CUDA_NVCC_DEPEND true")
- foreach(f ${CUDA_NVCC_DEPEND})
- #message("searching for ${f}")
- if(NOT EXISTS ${f})
- #message("file ${f} not found")
- set(CUDA_NVCC_DEPEND_REGENERATE TRUE)
- endif()
- endforeach(f)
- else(CUDA_NVCC_DEPEND)
- #message("CUDA_NVCC_DEPEND false")
- # No dependencies, so regenerate the file.
- set(CUDA_NVCC_DEPEND_REGENERATE TRUE)
- endif(CUDA_NVCC_DEPEND)
-
- #message("CUDA_NVCC_DEPEND_REGENERATE = ${CUDA_NVCC_DEPEND_REGENERATE}")
- # No incoming dependencies, so we need to generate them. Make the
- # output depend on the dependency file itself, which should cause the
- # rule to re-run.
- if(CUDA_NVCC_DEPEND_REGENERATE)
- file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n")
- endif(CUDA_NVCC_DEPEND_REGENERATE)
-
-endmacro(CUDA_INCLUDE_NVCC_DEPENDENCIES)
-
-###############################################################################
-###############################################################################
-# Setup default variables
-###############################################################################
-###############################################################################
-
-# Set whether we are using emulation or device mode.
-option(CUDA_BUILD_EMULATION "Build in Emulation mode" OFF)
-# Parse HOST_COMPILATION mode.
-option(CUDA_HOST_COMPILATION_CPP "Generated file extension" ON)
-# Allow the user to specify if the device code is supposed to be 32 or 64 bit.
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(CUDA_64_BIT_DEVICE_CODE_DEFAULT ON)
-else()
- set(CUDA_64_BIT_DEVICE_CODE_DEFAULT OFF)
-endif()
-option(CUDA_64_BIT_DEVICE_CODE "Compile device code in 64 bit mode" ${CUDA_64_BIT_DEVICE_CODE_DEFAULT})
-# Prints out extra information about the cuda file during compilation
-option(CUDA_BUILD_CUBIN "Generate and parse .cubin files in Device mode." OFF)
-# Extra user settable flags
-set(CUDA_NVCC_FLAGS "" CACHE STRING "Semi-colon delimit multiple arguments.")
-# Attach the build rule to the source file in VS. This option
-option(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE "Attach the build rule to the CUDA source file. Enable only when the CUDA source file is added to at most one target." ON)
-# Specifies whether the commands used when compiling the .cu file will be printed out.
-option(CUDA_VERBOSE_BUILD "Print out the commands run while compiling the CUDA source file. With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF)
-# Where to put the generated output.
-set(CUDA_GENERATED_OUTPUT_DIR "" CACHE PATH "Directory to put all the output files. If blank it will default to the CMAKE_CURRENT_BINARY_DIR")
-mark_as_advanced(
- CUDA_HOST_COMPILATION_CPP
- CUDA_64_BIT_DEVICE_CODE
- CUDA_NVCC_FLAGS
- CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE
- CUDA_GENERATED_OUTPUT_DIR
- )
-
-# Makefile and similar generators don't define CMAKE_CONFIGURATION_TYPES, so we
-# need to add another entry for the CMAKE_BUILD_TYPE. We also need to add the
-# standerd set of 4 build types (Debug, MinSizeRel, Release, and RelWithDebInfo)
-# for completeness. We need run this loop in order to accomodate the addition
-# of extra configuration types. Duplicate entries will be removed by
-# REMOVE_DUPLICATES.
-set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo)
-list(REMOVE_DUPLICATES CUDA_configuration_types)
-foreach(config ${CUDA_configuration_types})
- string(TOUPPER ${config} config_upper)
- set(CUDA_NVCC_FLAGS_${config_upper} "" CACHE STRING "Semi-colon delimit multiple arguments.")
- mark_as_advanced(CUDA_NVCC_FLAGS_${config_upper})
-endforeach()
-
-###############################################################################
-###############################################################################
-# Locate CUDA, Set Build Type, etc.
-###############################################################################
-###############################################################################
-
-# Check to see if the CUDA_TOOLKIT_ROOT_DIR and CUDA_SDK_ROOT_DIR have changed,
-# if they have then clear the cache variables, so that will be detected again.
-if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
- unset(CUDA_NVCC_EXECUTABLE CACHE)
- unset(CUDA_VERSION CACHE)
- unset(CUDA_TOOLKIT_INCLUDE CACHE)
- unset(CUDA_CUDART_LIBRARY CACHE)
- unset(CUDA_CUDA_LIBRARY CACHE)
- unset(CUDA_cublas_LIBRARY CACHE)
- unset(CUDA_cublasemu_LIBRARY CACHE)
- unset(CUDA_cufft_LIBRARY CACHE)
- unset(CUDA_cufftemu_LIBRARY CACHE)
-endif()
-
-if(NOT "${CUDA_SDK_ROOT_DIR}" STREQUAL "${CUDA_SDK_ROOT_DIR_INTERNAL}")
- unset(CUDA_CUT_INCLUDE_DIR CACHE)
- unset(CUDA_CUT_LIBRARY CACHE)
-endif()
-
-# Search for the cuda distribution.
-if(NOT CUDA_TOOLKIT_ROOT_DIR)
-
- # Search in the CUDA_BIN_PATH first.
- find_path(CUDA_TOOLKIT_ROOT_DIR
- NAMES nvcc nvcc.exe
- PATHS ENV CUDA_BIN_PATH
- DOC "Toolkit location."
- NO_DEFAULT_PATH
- )
- # Now search default paths
- find_path(CUDA_TOOLKIT_ROOT_DIR
- NAMES nvcc nvcc.exe
- PATHS /usr/local/bin
- /usr/local/cuda/bin
- DOC "Toolkit location."
- )
-
- if (CUDA_TOOLKIT_ROOT_DIR)
- string(REGEX REPLACE "[/\\\\]?bin[64]*[/\\\\]?$" "" CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR})
- # We need to force this back into the cache.
- set(CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Toolkit location." FORCE)
- endif(CUDA_TOOLKIT_ROOT_DIR)
- if (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR})
- if(CUDA_FIND_REQUIRED)
- message(FATAL_ERROR "Specify CUDA_TOOLKIT_ROOT_DIR")
- elseif(NOT CUDA_FIND_QUIETLY)
- message("CUDA_TOOLKIT_ROOT_DIR not found or specified")
- endif()
- endif (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR})
-endif (NOT CUDA_TOOLKIT_ROOT_DIR)
-
-# CUDA_NVCC_EXECUTABLE
-find_program(CUDA_NVCC_EXECUTABLE
- NAMES nvcc
- PATHS "${CUDA_TOOLKIT_ROOT_DIR}/bin64"
- "${CUDA_TOOLKIT_ROOT_DIR}/bin"
- ENV CUDA_BIN_PATH
- NO_DEFAULT_PATH
- )
-# Search default search paths, after we search our own set of paths.
-find_program(CUDA_NVCC_EXECUTABLE nvcc)
-mark_as_advanced(CUDA_NVCC_EXECUTABLE)
-
-if(CUDA_NVCC_EXECUTABLE AND NOT CUDA_VERSION)
- # Compute the version.
- exec_program(${CUDA_NVCC_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE NVCC_OUT)
- string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR ${NVCC_OUT})
- string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR ${NVCC_OUT})
- set(CUDA_VERSION "${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}" CACHE STRING "Version of CUDA as computed from nvcc.")
- mark_as_advanced(CUDA_VERSION)
-endif()
-
-# Always set this convenience variable
-set(CUDA_VERSION_STRING "${CUDA_VERSION}")
-
-# Here we need to determine if the version we found is acceptable. We will
-# assume that is unless CUDA_FIND_VERSION_EXACT or CUDA_FIND_VERSION is
-# specified. The presence of either of these options checks the version
-# string and signals if the version is acceptable or not.
-set(_cuda_version_acceptable TRUE)
-#
-if(CUDA_FIND_VERSION_EXACT AND NOT CUDA_VERSION VERSION_EQUAL CUDA_FIND_VERSION)
- set(_cuda_version_acceptable FALSE)
-endif()
-#
-if(CUDA_FIND_VERSION AND CUDA_VERSION VERSION_LESS CUDA_FIND_VERSION)
- set(_cuda_version_acceptable FALSE)
-endif()
-#
-if(NOT _cuda_version_acceptable)
- set(_cuda_error_message "Requested CUDA version ${CUDA_FIND_VERSION}, but found unacceptable version ${CUDA_VERSION}")
- if(CUDA_FIND_REQUIRED)
- message("${_cuda_error_message}")
- elseif(NOT CUDA_FIND_QUIETLY)
- message("${_cuda_error_message}")
- endif()
-endif()
-
-# CUDA_TOOLKIT_INCLUDE
-find_path(CUDA_TOOLKIT_INCLUDE
- device_functions.h # Header included in toolkit
- PATHS "${CUDA_TOOLKIT_ROOT_DIR}/include"
- ENV CUDA_INC_PATH
- NO_DEFAULT_PATH
- )
-# Search default search paths, after we search our own set of paths.
-find_path(CUDA_TOOLKIT_INCLUDE device_functions.h)
-mark_as_advanced(CUDA_TOOLKIT_INCLUDE)
-
-# Set the user list of include dir to nothing to initialize it.
-set (CUDA_NVCC_INCLUDE_ARGS_USER "")
-set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})
-
-macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(_cuda_64bit_lib_dir "${CUDA_TOOLKIT_ROOT_DIR}/lib64")
- endif()
- find_library(${_var}
- NAMES ${_names}
- PATHS ${_cuda_64bit_lib_dir}
- "${CUDA_TOOLKIT_ROOT_DIR}/lib"
- ENV CUDA_LIB_PATH
- DOC ${_doc}
- NO_DEFAULT_PATH
- )
- # Search default search paths, after we search our own set of paths.
- find_library(${_var} NAMES ${_names} DOC ${_doc})
-endmacro()
-
-# CUDA_LIBRARIES
-find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library")
-set(CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY})
-
-# 1.1 toolkit on linux doesn't appear to have a separate library on
-# some platforms.
-find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older versions only).")
-
-# Add cuda library to the link line only if it is found.
-if (CUDA_CUDA_LIBRARY)
- set(CUDA_LIBRARIES ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
-endif(CUDA_CUDA_LIBRARY)
-
-mark_as_advanced(
- CUDA_CUDA_LIBRARY
- CUDA_CUDART_LIBRARY
- )
-
-#######################
-# Look for some of the toolkit helper libraries
-macro(FIND_CUDA_HELPER_LIBS _name)
- find_library_local_first(CUDA_${_name}_LIBRARY ${_name} "\"${_name}\" library")
- mark_as_advanced(CUDA_${_name}_LIBRARY)
-endmacro(FIND_CUDA_HELPER_LIBS)
-
-# Search for cufft and cublas libraries.
-find_cuda_helper_libs(cufftemu)
-find_cuda_helper_libs(cublasemu)
-find_cuda_helper_libs(cufft)
-find_cuda_helper_libs(cublas)
-
-if (CUDA_BUILD_EMULATION)
- set(CUDA_CUFFT_LIBRARIES ${CUDA_cufftemu_LIBRARY})
- set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublasemu_LIBRARY})
-else()
- set(CUDA_CUFFT_LIBRARIES ${CUDA_cufft_LIBRARY})
- set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublas_LIBRARY})
-endif()
-
-########################
-# Look for the SDK stuff
-find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h
- "$ENV{NVSDKCUDA_ROOT}"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Installed Products\\NVIDIA SDK 10\\Compute;InstallDir]"
- )
-
-# Keep the CUDA_SDK_ROOT_DIR first in order to be able to override the
-# environment variables.
-set(CUDA_SDK_SEARCH_PATH
- "${CUDA_SDK_ROOT_DIR}"
- "${CUDA_TOOLKIT_ROOT_DIR}/local/NVSDK0.2"
- "${CUDA_TOOLKIT_ROOT_DIR}/NVSDK0.2"
- "${CUDA_TOOLKIT_ROOT_DIR}/NV_CUDA_SDK"
- "$ENV{HOME}/NVIDIA_CUDA_SDK"
- "$ENV{HOME}/NVIDIA_CUDA_SDK_MACOSX"
- "/Developer/CUDA"
- )
-# CUDA_CUT_INCLUDE_DIR
-find_path(CUDA_CUT_INCLUDE_DIR
- cutil.h
- PATHS ${CUDA_SDK_SEARCH_PATH}
- PATH_SUFFIXES "common/inc"
- DOC "Location of cutil.h"
- NO_DEFAULT_PATH
- )
-# Now search system paths
-find_path(CUDA_CUT_INCLUDE_DIR cutil.h DOC "Location of cutil.h")
-
-mark_as_advanced(CUDA_CUT_INCLUDE_DIR)
-
-
-# CUDA_CUT_LIBRARIES
-
-# cutil library is called cutil64 for 64 bit builds on windows. We don't want
-# to get these confused, so we are setting the name based on the word size of
-# the build.
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(cuda_cutil_name cutil64)
-else(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(cuda_cutil_name cutil32)
-endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
-
-find_library(CUDA_CUT_LIBRARY
- NAMES cutil ${cuda_cutil_name}
- PATHS ${CUDA_SDK_SEARCH_PATH}
- # The new version of the sdk shows up in common/lib, but the old one is in lib
- PATH_SUFFIXES "common/lib" "lib"
- DOC "Location of cutil library"
- NO_DEFAULT_PATH
- )
-# Now search system paths
-find_library(CUDA_CUT_LIBRARY NAMES cutil ${cuda_cutil_name} DOC "Location of cutil library")
-mark_as_advanced(CUDA_CUT_LIBRARY)
-set(CUDA_CUT_LIBRARIES ${CUDA_CUT_LIBRARY})
-
-
-
-#############################
-# Check for required components
-set(CUDA_FOUND TRUE)
-
-set(CUDA_TOOLKIT_ROOT_DIR_INTERNAL "${CUDA_TOOLKIT_ROOT_DIR}" CACHE INTERNAL
- "This is the value of the last time CUDA_TOOLKIT_ROOT_DIR was set successfully." FORCE)
-set(CUDA_SDK_ROOT_DIR_INTERNAL "${CUDA_SDK_ROOT_DIR}" CACHE INTERNAL
- "This is the value of the last time CUDA_SDK_ROOT_DIR was set successfully." FORCE)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(CUDA DEFAULT_MSG
- CUDA_TOOLKIT_ROOT_DIR
- CUDA_NVCC_EXECUTABLE
- CUDA_INCLUDE_DIRS
- CUDA_CUDART_LIBRARY
- _cuda_version_acceptable
- )
-
-
-
-###############################################################################
-###############################################################################
-# Macros
-###############################################################################
-###############################################################################
-
-###############################################################################
-# Add include directories to pass to the nvcc command.
-macro(CUDA_INCLUDE_DIRECTORIES)
- foreach(dir ${ARGN})
- list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER "-I${dir}")
- endforeach(dir ${ARGN})
-endmacro(CUDA_INCLUDE_DIRECTORIES)
-
-
-##############################################################################
-cuda_find_helper_file(parse_cubin cmake)
-cuda_find_helper_file(make2cmake cmake)
-cuda_find_helper_file(run_nvcc cmake)
-
-##############################################################################
-# Separate the OPTIONS out from the sources
-#
-macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _cmake_options _options)
- set( ${_sources} )
- set( ${_cmake_options} )
- set( ${_options} )
- set( _found_options FALSE )
- foreach(arg ${ARGN})
- if(arg STREQUAL "OPTIONS")
- set( _found_options TRUE )
- elseif(
- arg STREQUAL "WIN32" OR
- arg STREQUAL "MACOSX_BUNDLE" OR
- arg STREQUAL "EXCLUDE_FROM_ALL" OR
- arg STREQUAL "STATIC" OR
- arg STREQUAL "SHARED" OR
- arg STREQUAL "MODULE"
- )
- list(APPEND ${_cmake_options} "${arg}")
- else()
- if ( _found_options )
- list(APPEND ${_options} "${arg}")
- else()
- # Assume this is a file
- list(APPEND ${_sources} "${arg}")
- endif()
- endif()
- endforeach()
-endmacro()
-
-##############################################################################
-# Parse the OPTIONS from ARGN and set the variables prefixed by _option_prefix
-#
-macro(CUDA_PARSE_NVCC_OPTIONS _option_prefix)
- set( _found_config )
- foreach(arg ${ARGN})
- # Determine if we are dealing with a perconfiguration flag
- foreach(config ${CUDA_configuration_types})
- string(TOUPPER ${config} config_upper)
- if (arg STREQUAL "${config_upper}")
- set( _found_config _${arg})
- # Set arg to nothing to keep it from being processed further
- set( arg )
- endif()
- endforeach()
-
- if ( arg )
- list(APPEND ${_option_prefix}${_found_config} "${arg}")
- endif()
- endforeach()
-endmacro()
-
-##############################################################################
-# Helper to add the include directory for CUDA only once
-function(CUDA_ADD_CUDA_INCLUDE_ONCE)
- get_directory_property(_include_directories INCLUDE_DIRECTORIES)
- set(_add TRUE)
- if(_include_directories)
- foreach(dir ${_include_directories})
- if("${dir}" STREQUAL "${CUDA_INCLUDE_DIRS}")
- set(_add FALSE)
- endif()
- endforeach()
- endif()
- if(_add)
- include_directories(${CUDA_INCLUDE_DIRS})
- endif()
-endfunction()
-
-##############################################################################
-# This helper macro populates the following variables and setups up custom
-# commands and targets to invoke the nvcc compiler to generate C or PTX source
-# dependant upon the format parameter. The compiler is invoked once with -M
-# to generate a dependency file and a second time with -cuda or -ptx to generate
-# a .cpp or .ptx file.
-# INPUT:
-# cuda_target - Target name
-# format - PTX or OBJ
-# FILE1 .. FILEN - The remaining arguments are the sources to be wrapped.
-# OPTIONS - Extra options to NVCC
-# OUTPUT:
-# generated_files - List of generated files
-##############################################################################
-##############################################################################
-
-macro(CUDA_WRAP_SRCS cuda_target format generated_files)
-
- if( ${format} MATCHES "PTX" )
- set( compile_to_ptx ON )
- elseif( ${format} MATCHES "OBJ")
- set( compile_to_ptx OFF )
- else()
- message( FATAL_ERROR "Invalid format flag passed to CUDA_WRAP_SRCS: '${format}'. Use OBJ or PTX.")
- endif()
-
- # Set up all the command line flags here, so that they can be overriden on a per target basis.
-
- set(nvcc_flags "")
-
- # Emulation if the card isn't present.
- if (CUDA_BUILD_EMULATION)
- # Emulation.
- set(nvcc_flags ${nvcc_flags} --device-emulation -D_DEVICEEMU -g)
- else(CUDA_BUILD_EMULATION)
- # Device mode. No flags necessary.
- endif(CUDA_BUILD_EMULATION)
-
- if(CUDA_HOST_COMPILATION_CPP)
- set(CUDA_C_OR_CXX CXX)
- else(CUDA_HOST_COMPILATION_CPP)
- set(nvcc_flags ${nvcc_flags} --host-compilation C)
- set(CUDA_C_OR_CXX C)
- endif(CUDA_HOST_COMPILATION_CPP)
-
- set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION})
-
- if(CUDA_64_BIT_DEVICE_CODE)
- set(nvcc_flags ${nvcc_flags} -m64)
- else()
- set(nvcc_flags ${nvcc_flags} -m32)
- endif()
-
- # This needs to be passed in at this stage, because VS needs to fill out the
- # value of VCInstallDir from within VS.
- if(CMAKE_GENERATOR MATCHES "Visual Studio")
- if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
- # Add nvcc flag for 64b Windows
- set(ccbin_flags -D "\"CCBIN:PATH=$(VCInstallDir)bin\"" )
- endif()
- endif()
-
- # Figure out which configure we will use and pass that in as an argument to
- # the script. We need to defer the decision until compilation time, because
- # for VS projects we won't know if we are making a debug or release build
- # until build time.
- if(CMAKE_GENERATOR MATCHES "Visual Studio")
- set( CUDA_build_configuration "$(ConfigurationName)" )
- else()
- set( CUDA_build_configuration "${CMAKE_BUILD_TYPE}")
- endif()
-
- # Initialize our list of includes with the user ones followed by the CUDA system ones.
- set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "-I${CUDA_INCLUDE_DIRS}")
- # Get the include directories for this directory and use them for our nvcc command.
- get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)
- if(CUDA_NVCC_INCLUDE_DIRECTORIES)
- foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES})
- list(APPEND CUDA_NVCC_INCLUDE_ARGS "-I${dir}")
- endforeach()
- endif()
-
- # Reset these variables
- set(CUDA_WRAP_OPTION_NVCC_FLAGS)
- foreach(config ${CUDA_configuration_types})
- string(TOUPPER ${config} config_upper)
- set(CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper})
- endforeach()
-
- CUDA_GET_SOURCES_AND_OPTIONS(_cuda_wrap_sources _cuda_wrap_cmake_options _cuda_wrap_options ${ARGN})
- CUDA_PARSE_NVCC_OPTIONS(CUDA_WRAP_OPTION_NVCC_FLAGS ${_cuda_wrap_options})
-
- # Figure out if we are building a shared library. Default the value of BUILD_SHARED_LIBS.
- set(_cuda_build_shared_libs ${BUILD_SHARED_LIBS})
- # SHARED, MODULE
- list(FIND _cuda_wrap_cmake_options SHARED _cuda_found_SHARED)
- list(FIND _cuda_wrap_cmake_options MODULE _cuda_found_MODULE)
- if(_cuda_found_SHARED GREATER -1 OR _cuda_found_MODULE GREATER -1)
- set(_cuda_build_shared_libs TRUE)
- endif()
- # STATIC
- list(FIND _cuda_wrap_cmake_options STATIC _cuda_found_STATIC)
- if(_cuda_found_STATIC GREATER -1)
- set(_cuda_build_shared_libs FALSE)
- endif()
-
- # CUDA_HOST_FLAGS
- if(_cuda_build_shared_libs)
- # If we are setting up code for a shared library, then we need to add extra flags for
- # compiling objects for shared libraries.
- set(CUDA_HOST_SHARED_FLAGS ${CMAKE_SHARED_LIBRARY_${CUDA_C_OR_CXX}_FLAGS})
- endif()
- set(CUDA_HOST_FLAGS "set(CMAKE_HOST_FLAGS ${CMAKE_${CUDA_C_OR_CXX}_FLAGS} ${CUDA_HOST_SHARED_FLAGS})")
- set(CUDA_NVCC_FLAGS_CONFIG "# Build specific configuration flags")
- # Loop over all the configuration types to generate appropriate flags for run_nvcc.cmake
- foreach(config ${CUDA_configuration_types})
- string(TOUPPER ${config} config_upper)
- # CMAKE_FLAGS are strings and not lists. By not putting quotes around CMAKE_FLAGS
- # we convert the strings to lists (like we want).
-
- # nvcc chokes on -g3, so replace it with -g
- if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE "-g3" "-g" _cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
- else()
- set(_cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
- endif()
- set(CUDA_HOST_FLAGS "${CUDA_HOST_FLAGS}\nset(CMAKE_HOST_FLAGS_${config_upper} ${_cuda_C_FLAGS})")
- # Note that if we ever want CUDA_NVCC_FLAGS_<CONFIG> to be string (instead of a list
- # like it is currently), we can remove the quotes around the
- # ${CUDA_NVCC_FLAGS_${config_upper}} variable like the CMAKE_HOST_FLAGS_<CONFIG> variable.
- set(CUDA_NVCC_FLAGS_CONFIG "${CUDA_NVCC_FLAGS_CONFIG}\nset(CUDA_NVCC_FLAGS_${config_upper} \"${CUDA_NVCC_FLAGS_${config_upper}};${CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}}\")")
- endforeach()
-
- if(compile_to_ptx)
- # Don't use any of the host compilation flags for PTX targets
- set(CUDA_HOST_FLAGS)
- endif()
-
- # Get the list of definitions from the directory property
- get_directory_property(CUDA_NVCC_DEFINITIONS COMPILE_DEFINITIONS)
- if(CUDA_NVCC_DEFINITIONS)
- foreach(_definition ${CUDA_NVCC_DEFINITIONS})
- list(APPEND nvcc_flags "-D${_definition}")
- endforeach()
- endif()
-
- if(_cuda_build_shared_libs)
- list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS")
- endif()
-
- # Determine output directory
- if(CUDA_GENERATED_OUTPUT_DIR)
- set(cuda_compile_output_dir "${CUDA_GENERATED_OUTPUT_DIR}")
- else()
- set(cuda_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}")
- endif()
-
- # Reset the output variable
- set(_cuda_wrap_generated_files "")
-
- # Iterate over the macro arguments and create custom
- # commands for all the .cu files.
- foreach(file ${ARGN})
- # Ignore any file marked as a HEADER_FILE_ONLY
- get_source_file_property(_is_header ${file} HEADER_FILE_ONLY)
- if(${file} MATCHES ".*\\.cu$" AND NOT _is_header)
-
- # Add a custom target to generate a c or ptx file. ######################
-
- get_filename_component( basename ${file} NAME )
- if( compile_to_ptx )
- set(generated_file_path "${cuda_compile_output_dir}")
- set(generated_file_basename "${cuda_target}_generated_${basename}.ptx")
- set(format_flag "-ptx")
- file(MAKE_DIRECTORY "${cuda_compile_output_dir}")
- else( compile_to_ptx )
- set(generated_file_path "${cuda_compile_output_dir}/${CMAKE_CFG_INTDIR}")
- set(generated_file_basename "${cuda_target}_generated_${basename}${generated_extension}")
- set(format_flag "-c")
- endif( compile_to_ptx )
-
- # Set all of our file names. Make sure that whatever filenames that have
- # generated_file_path in them get passed in through as a command line
- # argument, so that the ${CMAKE_CFG_INTDIR} gets expanded at run time
- # instead of configure time.
- set(generated_file "${generated_file_path}/${generated_file_basename}")
- set(cmake_dependency_file "${CMAKE_CURRENT_BINARY_DIR}/${generated_file_basename}.depend")
- set(NVCC_generated_dependency_file "${CMAKE_CURRENT_BINARY_DIR}/${generated_file_basename}.NVCC-depend")
- set(generated_cubin_file "${generated_file_path}/${generated_file_basename}.cubin.txt")
- set(custom_target_script "${CMAKE_CURRENT_BINARY_DIR}/${generated_file_basename}.cmake")
-
- # Setup properties for obj files:
- if( NOT compile_to_ptx )
- set_source_files_properties("${generated_file}"
- PROPERTIES
- EXTERNAL_OBJECT true # This is an object file not to be compiled, but only be linked.
- )
- endif()
-
- # Don't add CMAKE_CURRENT_SOURCE_DIR if the path is already an absolute path.
- get_filename_component(file_path "${file}" PATH)
- if(IS_ABSOLUTE "${file_path}")
- set(source_file "${file}")
- else()
- set(source_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
- endif()
-
- # Bring in the dependencies. Creates a variable CUDA_NVCC_DEPEND #######
- cuda_include_nvcc_dependencies(${cmake_dependency_file})
-
- # Convience string for output ###########################################
- if(CUDA_BUILD_EMULATION)
- set(cuda_build_type "Emulation")
- else(CUDA_BUILD_EMULATION)
- set(cuda_build_type "Device")
- endif(CUDA_BUILD_EMULATION)
-
- # Build the NVCC made dependency file ###################################
- set(build_cubin OFF)
- if ( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN )
- if ( NOT compile_to_ptx )
- set ( build_cubin ON )
- endif( NOT compile_to_ptx )
- endif( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN )
-
- # Configure the build script
- configure_file("${CUDA_run_nvcc}" "${custom_target_script}" @ONLY)
-
- # So if a user specifies the same cuda file as input more than once, you
- # can have bad things happen with dependencies. Here we check an option
- # to see if this is the behavior they want.
- if(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE)
- set(main_dep MAIN_DEPENDENCY ${source_file})
- else()
- set(main_dep DEPENDS ${source_file})
- endif()
-
- if(CUDA_VERBOSE_BUILD)
- set(verbose_output ON)
- elseif(CMAKE_GENERATOR MATCHES "Makefiles")
- set(verbose_output "$(VERBOSE)")
- else()
- set(verbose_output OFF)
- endif()
-
- # Create up the comment string
- file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}")
- if(compile_to_ptx)
- set(cuda_build_comment_string "Building NVCC ptx file ${generated_file_relative_path}")
- else()
- set(cuda_build_comment_string "Building NVCC (${cuda_build_type}) object ${generated_file_relative_path}")
- endif()
-
- # Build the generated file and dependency file ##########################
- add_custom_command(
- OUTPUT ${generated_file}
- # These output files depend on the source_file and the contents of cmake_dependency_file
- ${main_dep}
- DEPENDS ${CUDA_NVCC_DEPEND}
- DEPENDS ${custom_target_script}
- COMMAND ${CMAKE_COMMAND} ARGS
- -D verbose:BOOL=${verbose_output}
- ${ccbin_flags}
- -D build_configuration:STRING=${CUDA_build_configuration}
- -D "generated_file:STRING=${generated_file}"
- -D "generated_cubin_file:STRING=${generated_cubin_file}"
- -P "${custom_target_script}"
- COMMENT "${cuda_build_comment_string}"
- )
-
- # Make sure the build system knows the file is generated.
- set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE)
-
- # Don't add the object file to the list of generated files if we are using
- # visual studio and we are attaching the build rule to the cuda file. VS
- # will add our object file to the linker automatically for us.
- set(cuda_add_generated_file TRUE)
-
- if(NOT compile_to_ptx AND CMAKE_GENERATOR MATCHES "Visual Studio" AND CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE)
- # Visual Studio 8 crashes when you close the solution when you don't add the object file.
- if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 8")
- #message("Not adding ${generated_file}")
- set(cuda_add_generated_file FALSE)
- endif()
- endif()
-
- if(cuda_add_generated_file)
- list(APPEND _cuda_wrap_generated_files ${generated_file})
- endif()
-
- # Add the other files that we want cmake to clean on a cleanup ##########
- list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}")
- list(REMOVE_DUPLICATES CUDA_ADDITIONAL_CLEAN_FILES)
- set(CUDA_ADDITIONAL_CLEAN_FILES ${CUDA_ADDITIONAL_CLEAN_FILES} CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.")
-
- endif(${file} MATCHES ".*\\.cu$" AND NOT _is_header)
- endforeach(file)
-
- # Set the return parameter
- set(${generated_files} ${_cuda_wrap_generated_files})
-endmacro(CUDA_WRAP_SRCS)
-
-
-###############################################################################
-###############################################################################
-# ADD LIBRARY
-###############################################################################
-###############################################################################
-macro(CUDA_ADD_LIBRARY cuda_target)
-
- CUDA_ADD_CUDA_INCLUDE_ONCE()
-
- # Separate the sources from the options
- CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
- # Create custom commands and targets for each file.
- CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} ${_cmake_options}
- OPTIONS ${_options} )
-
- # Add the library.
- add_library(${cuda_target} ${_cmake_options}
- ${_generated_files}
- ${_sources}
- )
-
- target_link_libraries(${cuda_target}
- ${CUDA_LIBRARIES}
- )
-
- # We need to set the linker language based on what the expected generated file
- # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP.
- set_target_properties(${cuda_target}
- PROPERTIES
- LINKER_LANGUAGE ${CUDA_C_OR_CXX}
- )
-
-endmacro(CUDA_ADD_LIBRARY cuda_target)
-
-
-###############################################################################
-###############################################################################
-# ADD EXECUTABLE
-###############################################################################
-###############################################################################
-macro(CUDA_ADD_EXECUTABLE cuda_target)
-
- CUDA_ADD_CUDA_INCLUDE_ONCE()
-
- # Separate the sources from the options
- CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
- # Create custom commands and targets for each file.
- CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} OPTIONS ${_options} )
-
- # Add the library.
- add_executable(${cuda_target} ${_cmake_options}
- ${_generated_files}
- ${_sources}
- )
-
- target_link_libraries(${cuda_target}
- ${CUDA_LIBRARIES}
- )
-
- # We need to set the linker language based on what the expected generated file
- # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP.
- set_target_properties(${cuda_target}
- PROPERTIES
- LINKER_LANGUAGE ${CUDA_C_OR_CXX}
- )
-
-endmacro(CUDA_ADD_EXECUTABLE cuda_target)
-
-
-###############################################################################
-###############################################################################
-# CUDA COMPILE
-###############################################################################
-###############################################################################
-macro(CUDA_COMPILE generated_files)
-
- # Separate the sources from the options
- CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
- # Create custom commands and targets for each file.
- CUDA_WRAP_SRCS( cuda_compile OBJ _generated_files ${_sources} ${_cmake_options}
- OPTIONS ${_options} )
-
- set( ${generated_files} ${_generated_files})
-
-endmacro(CUDA_COMPILE)
-
-
-###############################################################################
-###############################################################################
-# CUDA COMPILE PTX
-###############################################################################
-###############################################################################
-macro(CUDA_COMPILE_PTX generated_files)
-
- # Separate the sources from the options
- CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
- # Create custom commands and targets for each file.
- CUDA_WRAP_SRCS( cuda_compile_ptx PTX _generated_files ${_sources} ${_cmake_options}
- OPTIONS ${_options} )
-
- set( ${generated_files} ${_generated_files})
-
-endmacro(CUDA_COMPILE_PTX)
-
-###############################################################################
-###############################################################################
-# CUDA ADD CUFFT TO TARGET
-###############################################################################
-###############################################################################
-macro(CUDA_ADD_CUFFT_TO_TARGET target)
- if (CUDA_BUILD_EMULATION)
- target_link_libraries(${target} ${CUDA_cufftemu_LIBRARY})
- else()
- target_link_libraries(${target} ${CUDA_cufft_LIBRARY})
- endif()
-endmacro()
-
-###############################################################################
-###############################################################################
-# CUDA ADD CUBLAS TO TARGET
-###############################################################################
-###############################################################################
-macro(CUDA_ADD_CUBLAS_TO_TARGET target)
- if (CUDA_BUILD_EMULATION)
- target_link_libraries(${target} ${CUDA_cublasemu_LIBRARY})
- else()
- target_link_libraries(${target} ${CUDA_cublas_LIBRARY})
- endif()
-endmacro()
-
-###############################################################################
-###############################################################################
-# CUDA BUILD CLEAN TARGET
-###############################################################################
-###############################################################################
-macro(CUDA_BUILD_CLEAN_TARGET)
- # Call this after you add all your CUDA targets, and you will get a convience
- # target. You should also make clean after running this target to get the
- # build system to generate all the code again.
-
- set(cuda_clean_target_name clean_cuda_depends)
- if (CMAKE_GENERATOR MATCHES "Visual Studio")
- string(TOUPPER ${cuda_clean_target_name} cuda_clean_target_name)
- endif()
- add_custom_target(${cuda_clean_target_name}
- COMMAND ${CMAKE_COMMAND} -E remove ${CUDA_ADDITIONAL_CLEAN_FILES})
-
- # Clear out the variable, so the next time we configure it will be empty.
- # This is useful so that the files won't persist in the list after targets
- # have been removed.
- set(CUDA_ADDITIONAL_CLEAN_FILES "" CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.")
-endmacro(CUDA_BUILD_CLEAN_TARGET)
+# - Tools for building CUDA C files: libraries and build dependencies.
+# This script locates the NVIDIA CUDA C tools. It should work on linux, windows,
+# and mac and should be reasonably up to date with CUDA C releases.
+#
+# This script makes use of the standard find_package arguments of <VERSION>,
+# REQUIRED and QUIET. CUDA_FOUND will report if an acceptable version of CUDA
+# was found.
+#
+# The script will prompt the user to specify CUDA_TOOLKIT_ROOT_DIR if the prefix
+# cannot be determined by the location of nvcc in the system path and REQUIRED
+# is specified to find_package(). To use a different installed version of the
+# toolkit set the environment variable CUDA_BIN_PATH before running cmake
+# (e.g. CUDA_BIN_PATH=/usr/local/cuda1.0 instead of the default /usr/local/cuda)
+# or set CUDA_TOOLKIT_ROOT_DIR after configuring. If you change the value of
+# CUDA_TOOLKIT_ROOT_DIR, various components that depend on the path will be
+# relocated.
+#
+# It might be necessary to set CUDA_TOOLKIT_ROOT_DIR manually on certain
+# platforms, or to use a cuda runtime not installed in the default location. In
+# newer versions of the toolkit the cuda library is included with the graphics
+# driver- be sure that the driver version matches what is needed by the cuda
+# runtime version.
+#
+# The following variables affect the behavior of the macros in the script (in
+# alphebetical order). Note that any of these flags can be changed multiple
+# times in the same directory before calling CUDA_ADD_EXECUTABLE,
+# CUDA_ADD_LIBRARY, CUDA_COMPILE, CUDA_COMPILE_PTX or CUDA_WRAP_SRCS.
+#
+# CUDA_64_BIT_DEVICE_CODE (Default matches host bit size)
+# -- Set to ON to compile for 64 bit device code, OFF for 32 bit device code.
+# Note that making this different from the host code when generating object
+# or C files from CUDA code just won't work, because size_t gets defined by
+# nvcc in the generated source. If you compile to PTX and then load the
+# file yourself, you can mix bit sizes between device and host.
+#
+# CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE (Default ON)
+# -- Set to ON if you want the custom build rule to be attached to the source
+# file in Visual Studio. Turn OFF if you add the same cuda file to multiple
+# targets.
+#
+# This allows the user to build the target from the CUDA file; however, bad
+# things can happen if the CUDA source file is added to multiple targets.
+# When performing parallel builds it is possible for the custom build
+# command to be run more than once and in parallel causing cryptic build
+# errors. VS runs the rules for every source file in the target, and a
+# source can have only one rule no matter how many projects it is added to.
+# When the rule is run from multiple targets race conditions can occur on
+# the generated file. Eventually everything will get built, but if the user
+# is unaware of this behavior, there may be confusion. It would be nice if
+# this script could detect the reuse of source files across multiple targets
+# and turn the option off for the user, but no good solution could be found.
+#
+# CUDA_BUILD_CUBIN (Default OFF)
+# -- Set to ON to enable and extra compilation pass with the -cubin option in
+# Device mode. The output is parsed and register, shared memory usage is
+# printed during build.
+#
+# CUDA_BUILD_EMULATION (Default OFF for device mode)
+# -- Set to ON for Emulation mode. -D_DEVICEEMU is defined for CUDA C files
+# when CUDA_BUILD_EMULATION is TRUE.
+#
+# CUDA_GENERATED_OUTPUT_DIR (Default CMAKE_CURRENT_BINARY_DIR)
+# -- Set to the path you wish to have the generated files placed. If it is
+# blank output files will be placed in CMAKE_CURRENT_BINARY_DIR.
+# Intermediate files will always be placed in
+# CMAKE_CURRENT_BINARY_DIR/CMakeFiles.
+#
+# CUDA_HOST_COMPILATION_CPP (Default ON)
+# -- Set to OFF for C compilation of host code.
+#
+# CUDA_NVCC_FLAGS
+# CUDA_NVCC_FLAGS_<CONFIG>
+# -- Additional NVCC command line arguments. NOTE: multiple arguments must be
+# semi-colon delimited (e.g. --compiler-options;-Wall)
+#
+# CUDA_PROPAGATE_HOST_FLAGS (Default ON)
+# -- Set to ON to propagate CMAKE_{C,CXX}_FLAGS and their configuration
+# dependent counterparts (e.g. CMAKE_C_FLAGS_DEBUG) automatically to the
+# host compiler through nvcc's -Xcompiler flag. This helps make the
+# generated host code match the rest of the system better. Sometimes
+# certain flags give nvcc problems, and this will help you turn the flag
+# propagation off. This does not affect the flags supplied directly to nvcc
+# via CUDA_NVCC_FLAGS or through the OPTION flags specified through
+# CUDA_ADD_LIBRARY, CUDA_ADD_EXECUTABLE, or CUDA_WRAP_SRCS. Flags used for
+# shared library compilation are not affected by this flag.
+#
+# CUDA_VERBOSE_BUILD (Default OFF)
+# -- Set to ON to see all the commands used when building the CUDA file. When
+# using a Makefile generator the value defaults to VERBOSE (run make
+# VERBOSE=1 to see output), although setting CUDA_VERBOSE_BUILD to ON will
+# always print the output.
+#
+# The script creates the following macros (in alphebetical order):
+#
+# CUDA_ADD_CUFFT_TO_TARGET( cuda_target )
+# -- Adds the cufft library to the target (can be any target). Handles whether
+# you are in emulation mode or not.
+#
+# CUDA_ADD_CUBLAS_TO_TARGET( cuda_target )
+# -- Adds the cublas library to the target (can be any target). Handles
+# whether you are in emulation mode or not.
+#
+# CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ...
+# [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
+# -- Creates an executable "cuda_target" which is made up of the files
+# specified. All of the non CUDA C files are compiled using the standard
+# build rules specified by CMAKE and the cuda files are compiled to object
+# files using nvcc and the host compiler. In addition CUDA_INCLUDE_DIRS is
+# added automatically to include_directories(). Standard CMake target calls
+# can be used on the target after calling this macro
+# (e.g. set_target_properties and target_link_libraries).
+#
+# CUDA_ADD_LIBRARY( cuda_target file0 file1 ...
+# [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
+# -- Same as CUDA_ADD_EXECUTABLE except that a library is created.
+#
+# CUDA_BUILD_CLEAN_TARGET()
+# -- Creates a convience target that deletes all the dependency files
+# generated. You should make clean after running this target to ensure the
+# dependency files get regenerated.
+#
+# CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE]
+# [OPTIONS ...] )
+# -- Returns a list of generated files from the input source files to be used
+# with ADD_LIBRARY or ADD_EXECUTABLE.
+#
+# CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] )
+# -- Returns a list of PTX files generated from the input source files.
+#
+# CUDA_INCLUDE_DIRECTORIES( path0 path1 ... )
+# -- Sets the directories that should be passed to nvcc
+# (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu
+# files.
+#
+# CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ...
+# [STATIC | SHARED | MODULE] [OPTIONS ...] )
+# -- This is where all the magic happens. CUDA_ADD_EXECUTABLE,
+# CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this
+# function under the hood.
+#
+# Given the list of files (file0 file1 ... fileN) this macro generates
+# custom commands that generate either PTX or linkable objects (use "PTX" or
+# "OBJ" for the format argument to switch). Files that don't end with .cu
+# or have the HEADER_FILE_ONLY property are ignored.
+#
+# The arguments passed in after OPTIONS are extra command line options to
+# give to nvcc. You can also specify per configuration options by
+# specifying the name of the configuration followed by the options. General
+# options must preceed configuration specific options. Not all
+# configurations need to be specified, only the ones provided will be used.
+#
+# OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag"
+# DEBUG -g
+# RELEASE --use_fast_math
+# RELWITHDEBINFO --use_fast_math;-g
+# MINSIZEREL --use_fast_math
+#
+# For certain configurations (namely VS generating object files with
+# CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will
+# be produced for the given cuda file. This is because when you add the
+# cuda file to Visual Studio it knows that this file produces an object file
+# and will link in the resulting object file automatically.
+#
+# This script also looks at optional arguments STATIC, SHARED, or MODULE to
+# override the behavior specified by the value of the CMake variable
+# BUILD_SHARED_LIBS. See BUILD_SHARED_LIBS below for more details.
+#
+# This script will also generate a separate cmake script that is used at
+# build time to invoke nvcc. This is for serveral reasons.
+#
+# 1. nvcc can return negative numbers as return values which confuses
+# Visual Studio into thinking that the command succeeded. The script now
+# checks the error codes and produces errors when there was a problem.
+#
+# 2. nvcc has been known to not delete incomplete results when it
+# encounters problems. This confuses build systems into thinking the
+# target was generated when in fact an unusable file exists. The script
+# now deletes the output files if there was an error.
+#
+# 3. By putting all the options that affect the build into a file and then
+# make the build rule dependent on the file, the output files will be
+# regenerated when the options change.
+#
+# In addition, on some systems special flags are added for building objects
+# intended for shared libraries. FindCUDA make use of the CMake variable
+# BUILD_SHARED_LIBS and the usual STATIC, SHARED, and MODULE arguments to
+# determine if these flags should be used. Please set BUILD_SHARED_LIBS or
+# pass in STATIC, SHARED, or MODULE according to how the objects are to be
+# used before calling CUDA_ADD_LIBRARY. A preprocessor macro,
+# <target_name>_EXPORTS is defined when BUILD_SHARED_LIBS is defined.
+#
+# Flags passed into add_definitions with -D or /D are passed along to nvcc.
+#
+# The script defines the following variables:
+#
+# CUDA_VERSION_MAJOR -- The major version of cuda as reported by nvcc.
+# CUDA_VERSION_MINOR -- The minor version.
+# CUDA_VERSION
+# CUDA_VERSION_STRING -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR
+#
+# CUDA_TOOLKIT_ROOT_DIR -- Path to the CUDA Toolkit (defined if not set).
+# CUDA_SDK_ROOT_DIR -- Path to the CUDA SDK. Use this to find files in the
+# SDK. This script will not directly support finding
+# specific libraries or headers, as that isn't
+# supported by NVIDIA. If you want to change
+# libraries when the path changes see the
+# FindCUDA.cmake script for an example of how to clear
+# these variables. There are also examples of how to
+# use the CUDA_SDK_ROOT_DIR to locate headers or
+# libraries, if you so choose (at your own risk).
+# CUDA_INCLUDE_DIRS -- Include directory for cuda headers. Added automatically
+# for CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY.
+# CUDA_LIBRARIES -- Cuda RT library.
+# CUDA_CUFFT_LIBRARIES -- Device or emulation library for the Cuda FFT
+# implementation (alternative to:
+# CUDA_ADD_CUFFT_TO_TARGET macro)
+# CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS
+# implementation (alterative to:
+# CUDA_ADD_CUBLAS_TO_TARGET macro).
+#
+#
+# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
+# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
+#
+# Copyright (c) 2008-2009
+# NVIDIA Corp.
+#
+# Copyright (c) 2007-2009
+# Scientific Computing and Imaging Institute, University of Utah
+#
+# This code is licensed under the MIT License. See the FindCUDA.cmake script
+# for the text of the license.
+
+# The MIT License
+#
+# License for the specific language governing rights and limitations under
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+###############################################################################
+
+# FindCUDA.cmake
+
+# We need to have at least this version to support the VERSION_LESS argument to 'if' (2.6.2) and unset (2.6.3)
+cmake_policy(PUSH)
+cmake_minimum_required(VERSION 2.6.3)
+cmake_policy(POP)
+
+# This macro helps us find the location of helper files we will need the full path to
+macro(CUDA_FIND_HELPER_FILE _name _extension)
+ set(_full_name "${_name}.${_extension}")
+ # CMAKE_CURRENT_LIST_FILE contains the full path to the file currently being
+ # processed. Using this variable, we can pull out the current path, and
+ # provide a way to get access to the other files we need local to here.
+ get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+ find_file(CUDA_${_name} ${_full_name} PATHS ${CMAKE_CURRENT_LIST_DIR}/FindCUDA NO_DEFAULT_PATH)
+ if(NOT CUDA_${_name})
+ set(error_message "${_full_name} not found in CMAKE_MODULE_PATH")
+ if(CUDA_FIND_REQUIRED)
+ message(FATAL_ERROR "${error_message}")
+ else(CUDA_FIND_REQUIRED)
+ if(NOT CUDA_FIND_QUIETLY)
+ message(STATUS "${error_message}")
+ endif(NOT CUDA_FIND_QUIETLY)
+ endif(CUDA_FIND_REQUIRED)
+ endif(NOT CUDA_${_name})
+ # Set this variable as internal, so the user isn't bugged with it.
+ set(CUDA_${_name} ${CUDA_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE)
+endmacro(CUDA_FIND_HELPER_FILE)
+
+#####################################################################
+## CUDA_INCLUDE_NVCC_DEPENDENCIES
+##
+
+# So we want to try and include the dependency file if it exists. If
+# it doesn't exist then we need to create an empty one, so we can
+# include it.
+
+# If it does exist, then we need to check to see if all the files it
+# depends on exist. If they don't then we should clear the dependency
+# file and regenerate it later. This covers the case where a header
+# file has disappeared or moved.
+
+macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file)
+ set(CUDA_NVCC_DEPEND)
+ set(CUDA_NVCC_DEPEND_REGENERATE FALSE)
+
+
+ # Include the dependency file. Create it first if it doesn't exist . The
+ # INCLUDE puts a dependency that will force CMake to rerun and bring in the
+ # new info when it changes. DO NOT REMOVE THIS (as I did and spent a few
+ # hours figuring out why it didn't work.
+ if(NOT EXISTS ${dependency_file})
+ file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n")
+ endif()
+ # Always include this file to force CMake to run again next
+ # invocation and rebuild the dependencies.
+ #message("including dependency_file = ${dependency_file}")
+ include(${dependency_file})
+
+ # Now we need to verify the existence of all the included files
+ # here. If they aren't there we need to just blank this variable and
+ # make the file regenerate again.
+# if(DEFINED CUDA_NVCC_DEPEND)
+# message("CUDA_NVCC_DEPEND set")
+# else()
+# message("CUDA_NVCC_DEPEND NOT set")
+# endif()
+ if(CUDA_NVCC_DEPEND)
+ #message("CUDA_NVCC_DEPEND true")
+ foreach(f ${CUDA_NVCC_DEPEND})
+ #message("searching for ${f}")
+ if(NOT EXISTS ${f})
+ #message("file ${f} not found")
+ set(CUDA_NVCC_DEPEND_REGENERATE TRUE)
+ endif()
+ endforeach(f)
+ else(CUDA_NVCC_DEPEND)
+ #message("CUDA_NVCC_DEPEND false")
+ # No dependencies, so regenerate the file.
+ set(CUDA_NVCC_DEPEND_REGENERATE TRUE)
+ endif(CUDA_NVCC_DEPEND)
+
+ #message("CUDA_NVCC_DEPEND_REGENERATE = ${CUDA_NVCC_DEPEND_REGENERATE}")
+ # No incoming dependencies, so we need to generate them. Make the
+ # output depend on the dependency file itself, which should cause the
+ # rule to re-run.
+ if(CUDA_NVCC_DEPEND_REGENERATE)
+ file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n")
+ endif(CUDA_NVCC_DEPEND_REGENERATE)
+
+endmacro(CUDA_INCLUDE_NVCC_DEPENDENCIES)
+
+###############################################################################
+###############################################################################
+# Setup variables' defaults
+###############################################################################
+###############################################################################
+
+# Allow the user to specify if the device code is supposed to be 32 or 64 bit.
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(CUDA_64_BIT_DEVICE_CODE_DEFAULT ON)
+else()
+ set(CUDA_64_BIT_DEVICE_CODE_DEFAULT OFF)
+endif()
+option(CUDA_64_BIT_DEVICE_CODE "Compile device code in 64 bit mode" ${CUDA_64_BIT_DEVICE_CODE_DEFAULT})
+
+# Attach the build rule to the source file in VS. This option
+option(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE "Attach the build rule to the CUDA source file. Enable only when the CUDA source file is added to at most one target." ON)
+
+# Prints out extra information about the cuda file during compilation
+option(CUDA_BUILD_CUBIN "Generate and parse .cubin files in Device mode." OFF)
+
+# Set whether we are using emulation or device mode.
+option(CUDA_BUILD_EMULATION "Build in Emulation mode" OFF)
+
+# Where to put the generated output.
+set(CUDA_GENERATED_OUTPUT_DIR "" CACHE PATH "Directory to put all the output files. If blank it will default to the CMAKE_CURRENT_BINARY_DIR")
+
+# Parse HOST_COMPILATION mode.
+option(CUDA_HOST_COMPILATION_CPP "Generated file extension" ON)
+
+# Extra user settable flags
+set(CUDA_NVCC_FLAGS "" CACHE STRING "Semi-colon delimit multiple arguments.")
+
+# Propagate the host flags to the host compiler via -Xcompiler
+option(CUDA_PROPAGATE_HOST_FLAGS "Propage C/CXX_FLAGS and friends to the host compiler via -Xcompile" ON)
+
+# Specifies whether the commands used when compiling the .cu file will be printed out.
+option(CUDA_VERBOSE_BUILD "Print out the commands run while compiling the CUDA source file. With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF)
+
+mark_as_advanced(
+ CUDA_64_BIT_DEVICE_CODE
+ CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE
+ CUDA_GENERATED_OUTPUT_DIR
+ CUDA_HOST_COMPILATION_CPP
+ CUDA_NVCC_FLAGS
+ CUDA_PROPAGATE_HOST_FLAGS
+ )
+
+# Makefile and similar generators don't define CMAKE_CONFIGURATION_TYPES, so we
+# need to add another entry for the CMAKE_BUILD_TYPE. We also need to add the
+# standerd set of 4 build types (Debug, MinSizeRel, Release, and RelWithDebInfo)
+# for completeness. We need run this loop in order to accomodate the addition
+# of extra configuration types. Duplicate entries will be removed by
+# REMOVE_DUPLICATES.
+set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo)
+list(REMOVE_DUPLICATES CUDA_configuration_types)
+foreach(config ${CUDA_configuration_types})
+ string(TOUPPER ${config} config_upper)
+ set(CUDA_NVCC_FLAGS_${config_upper} "" CACHE STRING "Semi-colon delimit multiple arguments.")
+ mark_as_advanced(CUDA_NVCC_FLAGS_${config_upper})
+endforeach()
+
+###############################################################################
+###############################################################################
+# Locate CUDA, Set Build Type, etc.
+###############################################################################
+###############################################################################
+
+# Check to see if the CUDA_TOOLKIT_ROOT_DIR and CUDA_SDK_ROOT_DIR have changed,
+# if they have then clear the cache variables, so that will be detected again.
+if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
+ unset(CUDA_NVCC_EXECUTABLE CACHE)
+ unset(CUDA_VERSION CACHE)
+ unset(CUDA_TOOLKIT_INCLUDE CACHE)
+ unset(CUDA_CUDART_LIBRARY CACHE)
+ unset(CUDA_CUDA_LIBRARY CACHE)
+ unset(CUDA_cublas_LIBRARY CACHE)
+ unset(CUDA_cublasemu_LIBRARY CACHE)
+ unset(CUDA_cufft_LIBRARY CACHE)
+ unset(CUDA_cufftemu_LIBRARY CACHE)
+endif()
+
+if(NOT "${CUDA_SDK_ROOT_DIR}" STREQUAL "${CUDA_SDK_ROOT_DIR_INTERNAL}")
+ # No specific variables to catch. Use this kind of code before calling
+ # find_package(CUDA) to clean up any variables that may depend on this path.
+
+ # unset(MY_SPECIAL_CUDA_SDK_INCLUDE_DIR CACHE)
+ # unset(MY_SPECIAL_CUDA_SDK_LIBRARY CACHE)
+endif()
+
+# Search for the cuda distribution.
+if(NOT CUDA_TOOLKIT_ROOT_DIR)
+
+ # Search in the CUDA_BIN_PATH first.
+ find_path(CUDA_TOOLKIT_ROOT_DIR
+ NAMES nvcc nvcc.exe
+ PATHS ENV CUDA_BIN_PATH
+ DOC "Toolkit location."
+ NO_DEFAULT_PATH
+ )
+ # Now search default paths
+ find_path(CUDA_TOOLKIT_ROOT_DIR
+ NAMES nvcc nvcc.exe
+ PATHS /usr/local/bin
+ /usr/local/cuda/bin
+ DOC "Toolkit location."
+ )
+
+ if (CUDA_TOOLKIT_ROOT_DIR)
+ string(REGEX REPLACE "[/\\\\]?bin[64]*[/\\\\]?$" "" CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR})
+ # We need to force this back into the cache.
+ set(CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Toolkit location." FORCE)
+ endif(CUDA_TOOLKIT_ROOT_DIR)
+ if (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR})
+ if(CUDA_FIND_REQUIRED)
+ message(FATAL_ERROR "Specify CUDA_TOOLKIT_ROOT_DIR")
+ elseif(NOT CUDA_FIND_QUIETLY)
+ message("CUDA_TOOLKIT_ROOT_DIR not found or specified")
+ endif()
+ endif (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR})
+endif (NOT CUDA_TOOLKIT_ROOT_DIR)
+
+# CUDA_NVCC_EXECUTABLE
+find_program(CUDA_NVCC_EXECUTABLE
+ NAMES nvcc
+ PATHS "${CUDA_TOOLKIT_ROOT_DIR}/bin64"
+ "${CUDA_TOOLKIT_ROOT_DIR}/bin"
+ ENV CUDA_BIN_PATH
+ NO_DEFAULT_PATH
+ )
+# Search default search paths, after we search our own set of paths.
+find_program(CUDA_NVCC_EXECUTABLE nvcc)
+mark_as_advanced(CUDA_NVCC_EXECUTABLE)
+
+if(CUDA_NVCC_EXECUTABLE AND NOT CUDA_VERSION)
+ # Compute the version.
+ exec_program(${CUDA_NVCC_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE NVCC_OUT)
+ string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR ${NVCC_OUT})
+ string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR ${NVCC_OUT})
+ set(CUDA_VERSION "${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}" CACHE STRING "Version of CUDA as computed from nvcc.")
+ mark_as_advanced(CUDA_VERSION)
+endif()
+
+# Always set this convenience variable
+set(CUDA_VERSION_STRING "${CUDA_VERSION}")
+
+# Here we need to determine if the version we found is acceptable. We will
+# assume that is unless CUDA_FIND_VERSION_EXACT or CUDA_FIND_VERSION is
+# specified. The presence of either of these options checks the version
+# string and signals if the version is acceptable or not.
+set(_cuda_version_acceptable TRUE)
+#
+if(CUDA_FIND_VERSION_EXACT AND NOT CUDA_VERSION VERSION_EQUAL CUDA_FIND_VERSION)
+ set(_cuda_version_acceptable FALSE)
+endif()
+#
+if(CUDA_FIND_VERSION AND CUDA_VERSION VERSION_LESS CUDA_FIND_VERSION)
+ set(_cuda_version_acceptable FALSE)
+endif()
+#
+if(NOT _cuda_version_acceptable)
+ set(_cuda_error_message "Requested CUDA version ${CUDA_FIND_VERSION}, but found unacceptable version ${CUDA_VERSION}")
+ if(CUDA_FIND_REQUIRED)
+ message("${_cuda_error_message}")
+ elseif(NOT CUDA_FIND_QUIETLY)
+ message("${_cuda_error_message}")
+ endif()
+endif()
+
+# CUDA_TOOLKIT_INCLUDE
+find_path(CUDA_TOOLKIT_INCLUDE
+ device_functions.h # Header included in toolkit
+ PATHS "${CUDA_TOOLKIT_ROOT_DIR}/include"
+ ENV CUDA_INC_PATH
+ NO_DEFAULT_PATH
+ )
+# Search default search paths, after we search our own set of paths.
+find_path(CUDA_TOOLKIT_INCLUDE device_functions.h)
+mark_as_advanced(CUDA_TOOLKIT_INCLUDE)
+
+# Set the user list of include dir to nothing to initialize it.
+set (CUDA_NVCC_INCLUDE_ARGS_USER "")
+set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})
+
+macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_cuda_64bit_lib_dir "${CUDA_TOOLKIT_ROOT_DIR}/lib64")
+ endif()
+ find_library(${_var}
+ NAMES ${_names}
+ PATHS ${_cuda_64bit_lib_dir}
+ "${CUDA_TOOLKIT_ROOT_DIR}/lib"
+ ENV CUDA_LIB_PATH
+ DOC ${_doc}
+ NO_DEFAULT_PATH
+ )
+ # Search default search paths, after we search our own set of paths.
+ find_library(${_var} NAMES ${_names} DOC ${_doc})
+endmacro()
+
+# CUDA_LIBRARIES
+find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library")
+set(CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY})
+
+# 1.1 toolkit on linux doesn't appear to have a separate library on
+# some platforms.
+find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older versions only).")
+
+# Add cuda library to the link line only if it is found.
+if (CUDA_CUDA_LIBRARY)
+ set(CUDA_LIBRARIES ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
+endif(CUDA_CUDA_LIBRARY)
+
+mark_as_advanced(
+ CUDA_CUDA_LIBRARY
+ CUDA_CUDART_LIBRARY
+ )
+
+#######################
+# Look for some of the toolkit helper libraries
+macro(FIND_CUDA_HELPER_LIBS _name)
+ find_library_local_first(CUDA_${_name}_LIBRARY ${_name} "\"${_name}\" library")
+ mark_as_advanced(CUDA_${_name}_LIBRARY)
+endmacro(FIND_CUDA_HELPER_LIBS)
+
+# Search for cufft and cublas libraries.
+find_cuda_helper_libs(cufftemu)
+find_cuda_helper_libs(cublasemu)
+find_cuda_helper_libs(cufft)
+find_cuda_helper_libs(cublas)
+
+if (CUDA_BUILD_EMULATION)
+ set(CUDA_CUFFT_LIBRARIES ${CUDA_cufftemu_LIBRARY})
+ set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublasemu_LIBRARY})
+else()
+ set(CUDA_CUFFT_LIBRARIES ${CUDA_cufft_LIBRARY})
+ set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublas_LIBRARY})
+endif()
+
+########################
+# Look for the SDK stuff
+find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h
+ "$ENV{NVSDKCUDA_ROOT}"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Installed Products\\NVIDIA SDK 10\\Compute;InstallDir]"
+ "/Developer/GPU\ Computing/C"
+ )
+
+# Keep the CUDA_SDK_ROOT_DIR first in order to be able to override the
+# environment variables.
+set(CUDA_SDK_SEARCH_PATH
+ "${CUDA_SDK_ROOT_DIR}"
+ "${CUDA_TOOLKIT_ROOT_DIR}/local/NVSDK0.2"
+ "${CUDA_TOOLKIT_ROOT_DIR}/NVSDK0.2"
+ "${CUDA_TOOLKIT_ROOT_DIR}/NV_CUDA_SDK"
+ "$ENV{HOME}/NVIDIA_CUDA_SDK"
+ "$ENV{HOME}/NVIDIA_CUDA_SDK_MACOSX"
+ "/Developer/CUDA"
+ )
+
+# Example of how to find an include file from the CUDA_SDK_ROOT_DIR
+
+# find_path(CUDA_CUT_INCLUDE_DIR
+# cutil.h
+# PATHS ${CUDA_SDK_SEARCH_PATH}
+# PATH_SUFFIXES "common/inc"
+# DOC "Location of cutil.h"
+# NO_DEFAULT_PATH
+# )
+# # Now search system paths
+# find_path(CUDA_CUT_INCLUDE_DIR cutil.h DOC "Location of cutil.h")
+
+# mark_as_advanced(CUDA_CUT_INCLUDE_DIR)
+
+
+# Example of how to find a library in the CUDA_SDK_ROOT_DIR
+
+# # cutil library is called cutil64 for 64 bit builds on windows. We don't want
+# # to get these confused, so we are setting the name based on the word size of
+# # the build.
+
+# if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+# set(cuda_cutil_name cutil64)
+# else(CMAKE_SIZEOF_VOID_P EQUAL 8)
+# set(cuda_cutil_name cutil32)
+# endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+
+# find_library(CUDA_CUT_LIBRARY
+# NAMES cutil ${cuda_cutil_name}
+# PATHS ${CUDA_SDK_SEARCH_PATH}
+# # The new version of the sdk shows up in common/lib, but the old one is in lib
+# PATH_SUFFIXES "common/lib" "lib"
+# DOC "Location of cutil library"
+# NO_DEFAULT_PATH
+# )
+# # Now search system paths
+# find_library(CUDA_CUT_LIBRARY NAMES cutil ${cuda_cutil_name} DOC "Location of cutil library")
+# mark_as_advanced(CUDA_CUT_LIBRARY)
+# set(CUDA_CUT_LIBRARIES ${CUDA_CUT_LIBRARY})
+
+
+
+#############################
+# Check for required components
+set(CUDA_FOUND TRUE)
+
+set(CUDA_TOOLKIT_ROOT_DIR_INTERNAL "${CUDA_TOOLKIT_ROOT_DIR}" CACHE INTERNAL
+ "This is the value of the last time CUDA_TOOLKIT_ROOT_DIR was set successfully." FORCE)
+set(CUDA_SDK_ROOT_DIR_INTERNAL "${CUDA_SDK_ROOT_DIR}" CACHE INTERNAL
+ "This is the value of the last time CUDA_SDK_ROOT_DIR was set successfully." FORCE)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CUDA DEFAULT_MSG
+ CUDA_TOOLKIT_ROOT_DIR
+ CUDA_NVCC_EXECUTABLE
+ CUDA_INCLUDE_DIRS
+ CUDA_CUDART_LIBRARY
+ _cuda_version_acceptable
+ )
+
+
+
+###############################################################################
+###############################################################################
+# Macros
+###############################################################################
+###############################################################################
+
+###############################################################################
+# Add include directories to pass to the nvcc command.
+macro(CUDA_INCLUDE_DIRECTORIES)
+ foreach(dir ${ARGN})
+ list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER "-I${dir}")
+ endforeach(dir ${ARGN})
+endmacro(CUDA_INCLUDE_DIRECTORIES)
+
+
+##############################################################################
+cuda_find_helper_file(parse_cubin cmake)
+cuda_find_helper_file(make2cmake cmake)
+cuda_find_helper_file(run_nvcc cmake)
+
+##############################################################################
+# Separate the OPTIONS out from the sources
+#
+macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _cmake_options _options)
+ set( ${_sources} )
+ set( ${_cmake_options} )
+ set( ${_options} )
+ set( _found_options FALSE )
+ foreach(arg ${ARGN})
+ if(arg STREQUAL "OPTIONS")
+ set( _found_options TRUE )
+ elseif(
+ arg STREQUAL "WIN32" OR
+ arg STREQUAL "MACOSX_BUNDLE" OR
+ arg STREQUAL "EXCLUDE_FROM_ALL" OR
+ arg STREQUAL "STATIC" OR
+ arg STREQUAL "SHARED" OR
+ arg STREQUAL "MODULE"
+ )
+ list(APPEND ${_cmake_options} "${arg}")
+ else()
+ if ( _found_options )
+ list(APPEND ${_options} "${arg}")
+ else()
+ # Assume this is a file
+ list(APPEND ${_sources} "${arg}")
+ endif()
+ endif()
+ endforeach()
+endmacro()
+
+##############################################################################
+# Parse the OPTIONS from ARGN and set the variables prefixed by _option_prefix
+#
+macro(CUDA_PARSE_NVCC_OPTIONS _option_prefix)
+ set( _found_config )
+ foreach(arg ${ARGN})
+ # Determine if we are dealing with a perconfiguration flag
+ foreach(config ${CUDA_configuration_types})
+ string(TOUPPER ${config} config_upper)
+ if (arg STREQUAL "${config_upper}")
+ set( _found_config _${arg})
+ # Set arg to nothing to keep it from being processed further
+ set( arg )
+ endif()
+ endforeach()
+
+ if ( arg )
+ list(APPEND ${_option_prefix}${_found_config} "${arg}")
+ endif()
+ endforeach()
+endmacro()
+
+##############################################################################
+# Helper to add the include directory for CUDA only once
+function(CUDA_ADD_CUDA_INCLUDE_ONCE)
+ get_directory_property(_include_directories INCLUDE_DIRECTORIES)
+ set(_add TRUE)
+ if(_include_directories)
+ foreach(dir ${_include_directories})
+ if("${dir}" STREQUAL "${CUDA_INCLUDE_DIRS}")
+ set(_add FALSE)
+ endif()
+ endforeach()
+ endif()
+ if(_add)
+ include_directories(${CUDA_INCLUDE_DIRS})
+ endif()
+endfunction()
+
+##############################################################################
+# This helper macro populates the following variables and setups up custom
+# commands and targets to invoke the nvcc compiler to generate C or PTX source
+# dependant upon the format parameter. The compiler is invoked once with -M
+# to generate a dependency file and a second time with -cuda or -ptx to generate
+# a .cpp or .ptx file.
+# INPUT:
+# cuda_target - Target name
+# format - PTX or OBJ
+# FILE1 .. FILEN - The remaining arguments are the sources to be wrapped.
+# OPTIONS - Extra options to NVCC
+# OUTPUT:
+# generated_files - List of generated files
+##############################################################################
+##############################################################################
+
+macro(CUDA_WRAP_SRCS cuda_target format generated_files)
+
+ if( ${format} MATCHES "PTX" )
+ set( compile_to_ptx ON )
+ elseif( ${format} MATCHES "OBJ")
+ set( compile_to_ptx OFF )
+ else()
+ message( FATAL_ERROR "Invalid format flag passed to CUDA_WRAP_SRCS: '${format}'. Use OBJ or PTX.")
+ endif()
+
+ # Set up all the command line flags here, so that they can be overriden on a per target basis.
+
+ set(nvcc_flags "")
+
+ # Emulation if the card isn't present.
+ if (CUDA_BUILD_EMULATION)
+ # Emulation.
+ set(nvcc_flags ${nvcc_flags} --device-emulation -D_DEVICEEMU -g)
+ else(CUDA_BUILD_EMULATION)
+ # Device mode. No flags necessary.
+ endif(CUDA_BUILD_EMULATION)
+
+ if(CUDA_HOST_COMPILATION_CPP)
+ set(CUDA_C_OR_CXX CXX)
+ else(CUDA_HOST_COMPILATION_CPP)
+ set(nvcc_flags ${nvcc_flags} --host-compilation C)
+ set(CUDA_C_OR_CXX C)
+ endif(CUDA_HOST_COMPILATION_CPP)
+
+ set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION})
+
+ if(CUDA_64_BIT_DEVICE_CODE)
+ set(nvcc_flags ${nvcc_flags} -m64)
+ else()
+ set(nvcc_flags ${nvcc_flags} -m32)
+ endif()
+
+ # This needs to be passed in at this stage, because VS needs to fill out the
+ # value of VCInstallDir from within VS.
+ if(CMAKE_GENERATOR MATCHES "Visual Studio")
+ if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+ # Add nvcc flag for 64b Windows
+ set(ccbin_flags -D "\"CCBIN:PATH=$(VCInstallDir)bin\"" )
+ endif()
+ endif()
+
+ # Figure out which configure we will use and pass that in as an argument to
+ # the script. We need to defer the decision until compilation time, because
+ # for VS projects we won't know if we are making a debug or release build
+ # until build time.
+ if(CMAKE_GENERATOR MATCHES "Visual Studio")
+ set( CUDA_build_configuration "$(ConfigurationName)" )
+ else()
+ set( CUDA_build_configuration "${CMAKE_BUILD_TYPE}")
+ endif()
+
+ # Initialize our list of includes with the user ones followed by the CUDA system ones.
+ set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "-I${CUDA_INCLUDE_DIRS}")
+ # Get the include directories for this directory and use them for our nvcc command.
+ get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)
+ if(CUDA_NVCC_INCLUDE_DIRECTORIES)
+ foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES})
+ list(APPEND CUDA_NVCC_INCLUDE_ARGS "-I${dir}")
+ endforeach()
+ endif()
+
+ # Reset these variables
+ set(CUDA_WRAP_OPTION_NVCC_FLAGS)
+ foreach(config ${CUDA_configuration_types})
+ string(TOUPPER ${config} config_upper)
+ set(CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper})
+ endforeach()
+
+ CUDA_GET_SOURCES_AND_OPTIONS(_cuda_wrap_sources _cuda_wrap_cmake_options _cuda_wrap_options ${ARGN})
+ CUDA_PARSE_NVCC_OPTIONS(CUDA_WRAP_OPTION_NVCC_FLAGS ${_cuda_wrap_options})
+
+ # Figure out if we are building a shared library. Default the value of BUILD_SHARED_LIBS.
+ set(_cuda_build_shared_libs ${BUILD_SHARED_LIBS})
+ # SHARED, MODULE
+ list(FIND _cuda_wrap_cmake_options SHARED _cuda_found_SHARED)
+ list(FIND _cuda_wrap_cmake_options MODULE _cuda_found_MODULE)
+ if(_cuda_found_SHARED GREATER -1 OR _cuda_found_MODULE GREATER -1)
+ set(_cuda_build_shared_libs TRUE)
+ endif()
+ # STATIC
+ list(FIND _cuda_wrap_cmake_options STATIC _cuda_found_STATIC)
+ if(_cuda_found_STATIC GREATER -1)
+ set(_cuda_build_shared_libs FALSE)
+ endif()
+
+ # CUDA_HOST_FLAGS
+ if(_cuda_build_shared_libs)
+ # If we are setting up code for a shared library, then we need to add extra flags for
+ # compiling objects for shared libraries.
+ set(CUDA_HOST_SHARED_FLAGS ${CMAKE_SHARED_LIBRARY_${CUDA_C_OR_CXX}_FLAGS})
+ endif()
+ # Only add the CMAKE_{C,CXX}_FLAGS if we are propagating host flags. We
+ # always need to set the SHARED_FLAGS, though.
+ if(CUDA_PROPAGATE_HOST_FLAGS)
+ set(CUDA_HOST_FLAGS "set(CMAKE_HOST_FLAGS ${CMAKE_${CUDA_C_OR_CXX}_FLAGS} ${CUDA_HOST_SHARED_FLAGS})")
+ else()
+ set(CUDA_HOST_FLAGS "set(CMAKE_HOST_FLAGS ${CUDA_HOST_SHARED_FLAGS})")
+ endif()
+
+ set(CUDA_NVCC_FLAGS_CONFIG "# Build specific configuration flags")
+ # Loop over all the configuration types to generate appropriate flags for run_nvcc.cmake
+ foreach(config ${CUDA_configuration_types})
+ string(TOUPPER ${config} config_upper)
+ # CMAKE_FLAGS are strings and not lists. By not putting quotes around CMAKE_FLAGS
+ # we convert the strings to lists (like we want).
+
+ if(CUDA_PROPAGATE_HOST_FLAGS)
+ # nvcc chokes on -g3, so replace it with -g
+ if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE "-g3" "-g" _cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
+ else()
+ set(_cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}")
+ endif()
+
+ set(CUDA_HOST_FLAGS "${CUDA_HOST_FLAGS}\nset(CMAKE_HOST_FLAGS_${config_upper} ${_cuda_C_FLAGS})")
+ endif()
+
+ # Note that if we ever want CUDA_NVCC_FLAGS_<CONFIG> to be string (instead of a list
+ # like it is currently), we can remove the quotes around the
+ # ${CUDA_NVCC_FLAGS_${config_upper}} variable like the CMAKE_HOST_FLAGS_<CONFIG> variable.
+ set(CUDA_NVCC_FLAGS_CONFIG "${CUDA_NVCC_FLAGS_CONFIG}\nset(CUDA_NVCC_FLAGS_${config_upper} \"${CUDA_NVCC_FLAGS_${config_upper}};;${CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}}\")")
+ endforeach()
+
+ if(compile_to_ptx)
+ # Don't use any of the host compilation flags for PTX targets.
+ set(CUDA_HOST_FLAGS)
+ set(CUDA_NVCC_FLAGS_CONFIG)
+ endif()
+
+ # Get the list of definitions from the directory property
+ get_directory_property(CUDA_NVCC_DEFINITIONS COMPILE_DEFINITIONS)
+ if(CUDA_NVCC_DEFINITIONS)
+ foreach(_definition ${CUDA_NVCC_DEFINITIONS})
+ list(APPEND nvcc_flags "-D${_definition}")
+ endforeach()
+ endif()
+
+ if(_cuda_build_shared_libs)
+ list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS")
+ endif()
+
+ # Determine output directory
+ if(CUDA_GENERATED_OUTPUT_DIR)
+ set(cuda_compile_output_dir "${CUDA_GENERATED_OUTPUT_DIR}")
+ else()
+ set(cuda_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}")
+ endif()
+
+ # Reset the output variable
+ set(_cuda_wrap_generated_files "")
+
+ # Iterate over the macro arguments and create custom
+ # commands for all the .cu files.
+ foreach(file ${ARGN})
+ # Ignore any file marked as a HEADER_FILE_ONLY
+ get_source_file_property(_is_header ${file} HEADER_FILE_ONLY)
+ if(${file} MATCHES ".*\\.cu$" AND NOT _is_header)
+
+ # Add a custom target to generate a c or ptx file. ######################
+
+ get_filename_component( basename ${file} NAME )
+ if( compile_to_ptx )
+ set(generated_file_path "${cuda_compile_output_dir}")
+ set(generated_file_basename "${cuda_target}_generated_${basename}.ptx")
+ set(format_flag "-ptx")
+ file(MAKE_DIRECTORY "${cuda_compile_output_dir}")
+ else( compile_to_ptx )
+ set(generated_file_path "${cuda_compile_output_dir}/${CMAKE_CFG_INTDIR}")
+ set(generated_file_basename "${cuda_target}_generated_${basename}${generated_extension}")
+ set(format_flag "-c")
+ endif( compile_to_ptx )
+
+ # Set all of our file names. Make sure that whatever filenames that have
+ # generated_file_path in them get passed in through as a command line
+ # argument, so that the ${CMAKE_CFG_INTDIR} gets expanded at run time
+ # instead of configure time.
+ set(generated_file "${generated_file_path}/${generated_file_basename}")
+ set(cmake_dependency_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${generated_file_basename}.depend")
+ set(NVCC_generated_dependency_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${generated_file_basename}.NVCC-depend")
+ set(generated_cubin_file "${generated_file_path}/${generated_file_basename}.cubin.txt")
+ set(custom_target_script "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${generated_file_basename}.cmake")
+
+ # Setup properties for obj files:
+ if( NOT compile_to_ptx )
+ set_source_files_properties("${generated_file}"
+ PROPERTIES
+ EXTERNAL_OBJECT true # This is an object file not to be compiled, but only be linked.
+ )
+ endif()
+
+ # Don't add CMAKE_CURRENT_SOURCE_DIR if the path is already an absolute path.
+ get_filename_component(file_path "${file}" PATH)
+ if(IS_ABSOLUTE "${file_path}")
+ set(source_file "${file}")
+ else()
+ set(source_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
+ endif()
+
+ # Bring in the dependencies. Creates a variable CUDA_NVCC_DEPEND #######
+ cuda_include_nvcc_dependencies(${cmake_dependency_file})
+
+ # Convience string for output ###########################################
+ if(CUDA_BUILD_EMULATION)
+ set(cuda_build_type "Emulation")
+ else(CUDA_BUILD_EMULATION)
+ set(cuda_build_type "Device")
+ endif(CUDA_BUILD_EMULATION)
+
+ # Build the NVCC made dependency file ###################################
+ set(build_cubin OFF)
+ if ( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN )
+ if ( NOT compile_to_ptx )
+ set ( build_cubin ON )
+ endif( NOT compile_to_ptx )
+ endif( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN )
+
+ # Configure the build script
+ configure_file("${CUDA_run_nvcc}" "${custom_target_script}" @ONLY)
+
+ # So if a user specifies the same cuda file as input more than once, you
+ # can have bad things happen with dependencies. Here we check an option
+ # to see if this is the behavior they want.
+ if(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE)
+ set(main_dep MAIN_DEPENDENCY ${source_file})
+ else()
+ set(main_dep DEPENDS ${source_file})
+ endif()
+
+ if(CUDA_VERBOSE_BUILD)
+ set(verbose_output ON)
+ elseif(CMAKE_GENERATOR MATCHES "Makefiles")
+ set(verbose_output "$(VERBOSE)")
+ else()
+ set(verbose_output OFF)
+ endif()
+
+ # Create up the comment string
+ file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}")
+ if(compile_to_ptx)
+ set(cuda_build_comment_string "Building NVCC ptx file ${generated_file_relative_path}")
+ else()
+ set(cuda_build_comment_string "Building NVCC (${cuda_build_type}) object ${generated_file_relative_path}")
+ endif()
+
+ # Build the generated file and dependency file ##########################
+ add_custom_command(
+ OUTPUT ${generated_file}
+ # These output files depend on the source_file and the contents of cmake_dependency_file
+ ${main_dep}
+ DEPENDS ${CUDA_NVCC_DEPEND}
+ DEPENDS ${custom_target_script}
+ COMMAND ${CMAKE_COMMAND} ARGS
+ -D verbose:BOOL=${verbose_output}
+ ${ccbin_flags}
+ -D build_configuration:STRING=${CUDA_build_configuration}
+ -D "generated_file:STRING=${generated_file}"
+ -D "generated_cubin_file:STRING=${generated_cubin_file}"
+ -P "${custom_target_script}"
+ COMMENT "${cuda_build_comment_string}"
+ )
+
+ # Make sure the build system knows the file is generated.
+ set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE)
+
+ # Don't add the object file to the list of generated files if we are using
+ # visual studio and we are attaching the build rule to the cuda file. VS
+ # will add our object file to the linker automatically for us.
+ set(cuda_add_generated_file TRUE)
+
+ if(NOT compile_to_ptx AND CMAKE_GENERATOR MATCHES "Visual Studio" AND CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE)
+ # Visual Studio 8 crashes when you close the solution when you don't add the object file.
+ if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 8")
+ #message("Not adding ${generated_file}")
+ set(cuda_add_generated_file FALSE)
+ endif()
+ endif()
+
+ if(cuda_add_generated_file)
+ list(APPEND _cuda_wrap_generated_files ${generated_file})
+ endif()
+
+ # Add the other files that we want cmake to clean on a cleanup ##########
+ list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}")
+ list(REMOVE_DUPLICATES CUDA_ADDITIONAL_CLEAN_FILES)
+ set(CUDA_ADDITIONAL_CLEAN_FILES ${CUDA_ADDITIONAL_CLEAN_FILES} CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.")
+
+ endif(${file} MATCHES ".*\\.cu$" AND NOT _is_header)
+ endforeach(file)
+
+ # Set the return parameter
+ set(${generated_files} ${_cuda_wrap_generated_files})
+endmacro(CUDA_WRAP_SRCS)
+
+
+###############################################################################
+###############################################################################
+# ADD LIBRARY
+###############################################################################
+###############################################################################
+macro(CUDA_ADD_LIBRARY cuda_target)
+
+ CUDA_ADD_CUDA_INCLUDE_ONCE()
+
+ # Separate the sources from the options
+ CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
+ # Create custom commands and targets for each file.
+ CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} ${_cmake_options}
+ OPTIONS ${_options} )
+
+ # Add the library.
+ add_library(${cuda_target} ${_cmake_options}
+ ${_generated_files}
+ ${_sources}
+ )
+
+ target_link_libraries(${cuda_target}
+ ${CUDA_LIBRARIES}
+ )
+
+ # We need to set the linker language based on what the expected generated file
+ # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP.
+ set_target_properties(${cuda_target}
+ PROPERTIES
+ LINKER_LANGUAGE ${CUDA_C_OR_CXX}
+ )
+
+endmacro(CUDA_ADD_LIBRARY cuda_target)
+
+
+###############################################################################
+###############################################################################
+# ADD EXECUTABLE
+###############################################################################
+###############################################################################
+macro(CUDA_ADD_EXECUTABLE cuda_target)
+
+ CUDA_ADD_CUDA_INCLUDE_ONCE()
+
+ # Separate the sources from the options
+ CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
+ # Create custom commands and targets for each file.
+ CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} OPTIONS ${_options} )
+
+ # Add the library.
+ add_executable(${cuda_target} ${_cmake_options}
+ ${_generated_files}
+ ${_sources}
+ )
+
+ target_link_libraries(${cuda_target}
+ ${CUDA_LIBRARIES}
+ )
+
+ # We need to set the linker language based on what the expected generated file
+ # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP.
+ set_target_properties(${cuda_target}
+ PROPERTIES
+ LINKER_LANGUAGE ${CUDA_C_OR_CXX}
+ )
+
+endmacro(CUDA_ADD_EXECUTABLE cuda_target)
+
+
+###############################################################################
+###############################################################################
+# CUDA COMPILE
+###############################################################################
+###############################################################################
+macro(CUDA_COMPILE generated_files)
+
+ # Separate the sources from the options
+ CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
+ # Create custom commands and targets for each file.
+ CUDA_WRAP_SRCS( cuda_compile OBJ _generated_files ${_sources} ${_cmake_options}
+ OPTIONS ${_options} )
+
+ set( ${generated_files} ${_generated_files})
+
+endmacro(CUDA_COMPILE)
+
+
+###############################################################################
+###############################################################################
+# CUDA COMPILE PTX
+###############################################################################
+###############################################################################
+macro(CUDA_COMPILE_PTX generated_files)
+
+ # Separate the sources from the options
+ CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
+ # Create custom commands and targets for each file.
+ CUDA_WRAP_SRCS( cuda_compile_ptx PTX _generated_files ${_sources} ${_cmake_options}
+ OPTIONS ${_options} )
+
+ set( ${generated_files} ${_generated_files})
+
+endmacro(CUDA_COMPILE_PTX)
+
+###############################################################################
+###############################################################################
+# CUDA ADD CUFFT TO TARGET
+###############################################################################
+###############################################################################
+macro(CUDA_ADD_CUFFT_TO_TARGET target)
+ if (CUDA_BUILD_EMULATION)
+ target_link_libraries(${target} ${CUDA_cufftemu_LIBRARY})
+ else()
+ target_link_libraries(${target} ${CUDA_cufft_LIBRARY})
+ endif()
+endmacro()
+
+###############################################################################
+###############################################################################
+# CUDA ADD CUBLAS TO TARGET
+###############################################################################
+###############################################################################
+macro(CUDA_ADD_CUBLAS_TO_TARGET target)
+ if (CUDA_BUILD_EMULATION)
+ target_link_libraries(${target} ${CUDA_cublasemu_LIBRARY})
+ else()
+ target_link_libraries(${target} ${CUDA_cublas_LIBRARY})
+ endif()
+endmacro()
+
+###############################################################################
+###############################################################################
+# CUDA BUILD CLEAN TARGET
+###############################################################################
+###############################################################################
+macro(CUDA_BUILD_CLEAN_TARGET)
+ # Call this after you add all your CUDA targets, and you will get a convience
+ # target. You should also make clean after running this target to get the
+ # build system to generate all the code again.
+
+ set(cuda_clean_target_name clean_cuda_depends)
+ if (CMAKE_GENERATOR MATCHES "Visual Studio")
+ string(TOUPPER ${cuda_clean_target_name} cuda_clean_target_name)
+ endif()
+ add_custom_target(${cuda_clean_target_name}
+ COMMAND ${CMAKE_COMMAND} -E remove ${CUDA_ADDITIONAL_CLEAN_FILES})
+
+ # Clear out the variable, so the next time we configure it will be empty.
+ # This is useful so that the files won't persist in the list after targets
+ # have been removed.
+ set(CUDA_ADDITIONAL_CLEAN_FILES "" CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.")
+endmacro(CUDA_BUILD_CLEAN_TARGET)
diff --git a/Modules/FindCUDA/make2cmake.cmake b/Modules/FindCUDA/make2cmake.cmake
index 24d2f9f..19e47d5 100644
--- a/Modules/FindCUDA/make2cmake.cmake
+++ b/Modules/FindCUDA/make2cmake.cmake
@@ -1,74 +1,80 @@
-
-# For more information, please see: http://software.sci.utah.edu
-#
-# The MIT License
-#
-# Copyright (c) 2007
-# Scientific Computing and Imaging Institute, University of Utah
-#
-# License for the specific language governing rights and limitations under
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-# Make2cmake CMake Script
-# Abe Stephens and James Bigler
-# (c) 2007 Scientific Computing and Imaging Institute, University of Utah
-# Note that the REGEX expressions may need to be tweaked for different dependency generators.
-
-file(READ ${input_file} depend_text)
-
-if (${depend_text} MATCHES ".+")
-
- # message("FOUND DEPENDS")
-
- # Remember, four backslashes is escaped to one backslash in the string.
- string(REGEX REPLACE "\\\\ " " " depend_text ${depend_text})
-
- # This works for the nvcc -M generated dependency files.
- string(REGEX REPLACE "^.* : " "" depend_text ${depend_text})
- string(REGEX REPLACE "[ \\\\]*\n" ";" depend_text ${depend_text})
-
- set(dependency_list "")
-
- foreach(file ${depend_text})
-
- string(REGEX REPLACE "^ +" "" file ${file})
-
- if(NOT IS_DIRECTORY ${file})
- # If softlinks start to matter, we should change this to REALPATH. For now we need
- # to flatten paths, because nvcc can generate stuff like /bin/../include instead of
- # just /include.
- get_filename_component(file_absolute "${file}" ABSOLUTE)
- list(APPEND dependency_list "${file_absolute}")
- endif(NOT IS_DIRECTORY ${file})
-
- endforeach(file)
-
-else()
- # message("FOUND NO DEPENDS")
-endif()
-
-# Remove the duplicate entries and sort them.
-list(REMOVE_DUPLICATES dependency_list)
-list(SORT dependency_list)
-
-foreach(file ${dependency_list})
- set(cuda_nvcc_depend "${cuda_nvcc_depend} \"${file}\"\n")
-endforeach()
-
-file(WRITE ${output_file} "# Generated by: make2cmake.cmake\nSET(CUDA_NVCC_DEPEND\n ${cuda_nvcc_depend})\n\n")
+# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
+# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
+#
+# Copyright (c) 2008-2009
+# NVIDIA Corp.
+#
+# Copyright (c) 2007-2009
+# Scientific Computing and Imaging Institute, University of Utah
+#
+# This code is licensed under the MIT License. See the FindCUDA.cmake script
+# for the text of the license.
+
+# The MIT License
+#
+# License for the specific language governing rights and limitations under
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+#######################################################################
+# This converts a file written in makefile syntax into one that can be included
+# by CMake.
+
+file(READ ${input_file} depend_text)
+
+if (${depend_text} MATCHES ".+")
+
+ # message("FOUND DEPENDS")
+
+ # Remember, four backslashes is escaped to one backslash in the string.
+ string(REGEX REPLACE "\\\\ " " " depend_text ${depend_text})
+
+ # This works for the nvcc -M generated dependency files.
+ string(REGEX REPLACE "^.* : " "" depend_text ${depend_text})
+ string(REGEX REPLACE "[ \\\\]*\n" ";" depend_text ${depend_text})
+
+ set(dependency_list "")
+
+ foreach(file ${depend_text})
+
+ string(REGEX REPLACE "^ +" "" file ${file})
+
+ if(NOT IS_DIRECTORY ${file})
+ # If softlinks start to matter, we should change this to REALPATH. For now we need
+ # to flatten paths, because nvcc can generate stuff like /bin/../include instead of
+ # just /include.
+ get_filename_component(file_absolute "${file}" ABSOLUTE)
+ list(APPEND dependency_list "${file_absolute}")
+ endif(NOT IS_DIRECTORY ${file})
+
+ endforeach(file)
+
+else()
+ # message("FOUND NO DEPENDS")
+endif()
+
+# Remove the duplicate entries and sort them.
+list(REMOVE_DUPLICATES dependency_list)
+list(SORT dependency_list)
+
+foreach(file ${dependency_list})
+ set(cuda_nvcc_depend "${cuda_nvcc_depend} \"${file}\"\n")
+endforeach()
+
+file(WRITE ${output_file} "# Generated by: make2cmake.cmake\nSET(CUDA_NVCC_DEPEND\n ${cuda_nvcc_depend})\n\n")
diff --git a/Modules/FindCUDA/parse_cubin.cmake b/Modules/FindCUDA/parse_cubin.cmake
index 1367d61..b41dd63 100644
--- a/Modules/FindCUDA/parse_cubin.cmake
+++ b/Modules/FindCUDA/parse_cubin.cmake
@@ -1,32 +1,40 @@
-# For more information, please see: http://software.sci.utah.edu
+# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
+# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
#
-# The MIT License
+# Copyright (c) 2008-2009
+# NVIDIA Corp.
#
-# Copyright (c) 2007
+# Copyright (c) 2007-2009
# Scientific Computing and Imaging Institute, University of Utah
#
-# License for the specific language governing rights and limitations under
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
+# This code is licensed under the MIT License. See the FindCUDA.cmake script
+# for the text of the license.
+
+# The MIT License
+#
+# License for the specific language governing rights and limitations under
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-# .cubin Parsing CMake Script
-# Abe Stephens
-# (c) 2007 Scientific Computing and Imaging Institute, University of Utah
+
+#######################################################################
+# Parses a .cubin file produced by nvcc and reports statistics about the file.
+
file(READ ${input_file} file_text)
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake
index 8fdee9a..9baca16 100644
--- a/Modules/FindCUDA/run_nvcc.cmake
+++ b/Modules/FindCUDA/run_nvcc.cmake
@@ -1,235 +1,266 @@
-# This file runs the nvcc commands to produce the desired output file along with
-# the dependency file needed by CMake to compute dependencies. In addition the
-# file checks the output of each command and if the command fails it deletes the
-# output files.
-
-# Input variables
-#
-# verbose:BOOL=<> OFF: Be as quiet as possible (default)
-# ON : Describe each step
-#
-# build_configuration:STRING=<> Typically one of Debug, MinSizeRel, Release, or
-# RelWithDebInfo, but it should match one of the
-# entries in CUDA_HOST_FLAGS. This is the build
-# configuration used when compiling the code. If
-# blank or unspecified Debug is assumed as this is
-# what CMake does.
-#
-# generated_file:STRING=<> File to generate. This argument must be passed in.
-#
-# generated_cubin_file:STRING=<> File to generate. This argument must be passed
-# in if build_cubin is true.
-
-if(NOT generated_file)
- message(FATAL_ERROR "You must specify generated_file on the command line")
-endif()
-
-# Set these up as variables to make reading the generated file easier
-set(CMAKE_COMMAND "@CMAKE_COMMAND@")
-set(source_file "@source_file@")
-set(NVCC_generated_dependency_file "@NVCC_generated_dependency_file@")
-set(cmake_dependency_file "@cmake_dependency_file@")
-set(CUDA_make2cmake "@CUDA_make2cmake@")
-set(CUDA_parse_cubin "@CUDA_parse_cubin@")
-set(build_cubin @build_cubin@)
-# We won't actually use these variables for now, but we need to set this, in
-# order to force this file to be run again if it changes.
-set(generated_file_path "@generated_file_path@")
-set(generated_file_internal "@generated_file@")
-set(generated_cubin_file_internal "@generated_cubin_file@")
-
-set(CUDA_NVCC_EXECUTABLE "@CUDA_NVCC_EXECUTABLE@")
-set(CUDA_NVCC_FLAGS "@CUDA_NVCC_FLAGS@;;@CUDA_WRAP_OPTION_NVCC_FLAGS@")
-@CUDA_NVCC_FLAGS_CONFIG@
-set(nvcc_flags "@nvcc_flags@")
-set(CUDA_NVCC_INCLUDE_ARGS "@CUDA_NVCC_INCLUDE_ARGS@")
-set(format_flag "@format_flag@")
-
-if(build_cubin AND NOT generated_cubin_file)
- message(FATAL_ERROR "You must specify generated_cubin_file on the command line")
-endif()
-
-# This is the list of host compilation flags. It C or CXX should already have
-# been chosen by FindCUDA.cmake.
-@CUDA_HOST_FLAGS@
-
-# Take the compiler flags and package them up to be sent to the compiler via -Xcompiler
-set(nvcc_host_compiler_flags "")
-# If we weren't given a build_configuration, use Debug.
-if(NOT build_configuration)
- set(build_configuration Debug)
-endif()
-string(TOUPPER "${build_configuration}" build_configuration)
-#message("CUDA_NVCC_HOST_COMPILER_FLAGS = ${CUDA_NVCC_HOST_COMPILER_FLAGS}")
-foreach(flag ${CMAKE_HOST_FLAGS} ${CMAKE_HOST_FLAGS_${build_configuration}})
- # Extra quotes are added around each flag to help nvcc parse out flags with spaces.
- set(nvcc_host_compiler_flags "${nvcc_host_compiler_flags},\"${flag}\"")
-endforeach()
-if (nvcc_host_compiler_flags)
- set(nvcc_host_compiler_flags "-Xcompiler" ${nvcc_host_compiler_flags})
-endif()
-#message("nvcc_host_compiler_flags = \"${nvcc_host_compiler_flags}\"")
-# Add the build specific configuration flags
-list(APPEND CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS_${build_configuration}})
-
-if(DEFINED CCBIN)
- set(CCBIN -ccbin "${CCBIN}")
-endif()
-
-# cuda_execute_process - Executes a command with optional command echo and status message.
-#
-# status - Status message to print if verbose is true
-# command - COMMAND argument from the usual execute_process argument structure
-# ARGN - Remaining arguments are the command with arguments
-#
-# CUDA_result - return value from running the command
-#
-# Make this a macro instead of a function, so that things like RESULT_VARIABLE
-# and other return variables are present after executing the process.
-macro(cuda_execute_process status command)
- set(_command ${command})
- if(NOT _command STREQUAL "COMMAND")
- message(FATAL_ERROR "Malformed call to cuda_execute_process. Missing COMMAND as second argument. (command = ${command})")
- endif()
- if(verbose)
- execute_process(COMMAND "${CMAKE_COMMAND}" -E echo -- ${status})
- # Now we need to build up our command string. We are accounting for quotes
- # and spaces, anything else is left up to the user to fix if they want to
- # copy and paste a runnable command line.
- set(cuda_execute_process_string)
- foreach(arg ${ARGN})
- # If there are quotes, excape them, so they come through.
- string(REPLACE "\"" "\\\"" arg ${arg})
- # Args with spaces need quotes around them to get them to be parsed as a single argument.
- if(arg MATCHES " ")
- list(APPEND cuda_execute_process_string "\"${arg}\"")
- else()
- list(APPEND cuda_execute_process_string ${arg})
- endif()
- endforeach()
- # Echo the command
- execute_process(COMMAND ${CMAKE_COMMAND} -E echo ${cuda_execute_process_string})
- endif(verbose)
- # Run the command
- execute_process(COMMAND ${ARGN} RESULT_VARIABLE CUDA_result )
-endmacro()
-
-# Delete the target file
-cuda_execute_process(
- "Removing ${generated_file}"
- COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
- )
-
-# Make sure the output directory is present
-cuda_execute_process(
- "Creating output directory: ${generated_file_path}"
- COMMAND "${CMAKE_COMMAND}" -E make_directory "${generated_file_path}"
- )
-
-# Generate the dependency file
-cuda_execute_process(
- "Generating dependency file: ${NVCC_generated_dependency_file}"
- COMMAND "${CUDA_NVCC_EXECUTABLE}"
- "${source_file}"
- ${CUDA_NVCC_FLAGS}
- ${nvcc_flags}
- ${CCBIN}
- ${nvcc_host_compiler_flags}
- -DNVCC
- -M
- -o "${NVCC_generated_dependency_file}"
- ${CUDA_NVCC_INCLUDE_ARGS}
- )
-
-if(CUDA_result)
- message(FATAL_ERROR "Error generating ${generated_file}")
-endif()
-
-# Generate the cmake readable dependency file to a temp file. Don't put the
-# quotes just around the filenames for the input_file and output_file variables.
-# CMake will pass the quotes through and not be able to find the file.
-cuda_execute_process(
- "Generating temporary cmake readable file: ${cmake_dependency_file}.tmp"
- COMMAND "${CMAKE_COMMAND}"
- -D "input_file:FILEPATH=${NVCC_generated_dependency_file}"
- -D "output_file:FILEPATH=${cmake_dependency_file}.tmp"
- -P "${CUDA_make2cmake}"
- )
-
-if(CUDA_result)
- message(FATAL_ERROR "Error generating ${generated_file}")
-endif()
-
-# Copy the file if it is different
-cuda_execute_process(
- "Copy if different ${cmake_dependency_file}.tmp to ${cmake_dependency_file}"
- COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${cmake_dependency_file}.tmp" "${cmake_dependency_file}"
- )
-
-if(CUDA_result)
- message(FATAL_ERROR "Error generating ${generated_file}")
-endif()
-
-# Delete the temporary file
-cuda_execute_process(
- "Removing ${cmake_dependency_file}.tmp and ${NVCC_generated_dependency_file}"
- COMMAND "${CMAKE_COMMAND}" -E remove "${cmake_dependency_file}.tmp" "${NVCC_generated_dependency_file}"
- )
-
-if(CUDA_result)
- message(FATAL_ERROR "Error generating ${generated_file}")
-endif()
-
-# Generate the code
-cuda_execute_process(
- "Generating ${generated_file}"
- COMMAND "${CUDA_NVCC_EXECUTABLE}"
- "${source_file}"
- ${CUDA_NVCC_FLAGS}
- ${nvcc_flags}
- ${CCBIN}
- ${nvcc_host_compiler_flags}
- -DNVCC
- ${format_flag} -o "${generated_file}"
- ${CUDA_NVCC_INCLUDE_ARGS}
- )
-
-if(CUDA_result)
- # Since nvcc can sometimes leave half done files make sure that we delete the output file.
- cuda_execute_process(
- "Removing ${generated_file}"
- COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
- )
- message(FATAL_ERROR "Error generating file ${generated_file}")
-else()
- if(verbose)
- message("Generated ${generated_file} successfully.")
- endif()
-endif()
-
-# Cubin resource report commands.
-if( build_cubin )
- # Run with -cubin to produce resource usage report.
- cuda_execute_process(
- "Generating ${generated_cubin_file}"
- COMMAND "${CUDA_NVCC_EXECUTABLE}"
- "${source_file}"
- ${CUDA_NVCC_FLAGS}
- ${nvcc_flags}
- ${CCBIN}
- ${nvcc_host_compiler_flags}
- -DNVCC
- -cubin
- -o "${generated_cubin_file}"
- ${CUDA_NVCC_INCLUDE_ARGS}
- )
-
- # Execute the parser script.
- cuda_execute_process(
- "Executing the parser script"
- COMMAND "${CMAKE_COMMAND}"
- -D "input_file:STRING=${generated_cubin_file}"
- -P "${CUDA_parse_cubin}"
- )
-
-endif( build_cubin )
+# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
+#
+# Copyright (c) 2008-2009
+# NVIDIA Corp.
+#
+# This code is licensed under the MIT License. See the FindCUDA.cmake script
+# for the text of the license.
+
+# The MIT License
+#
+# License for the specific language governing rights and limitations under
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+
+##########################################################################
+# This file runs the nvcc commands to produce the desired output file along with
+# the dependency file needed by CMake to compute dependencies. In addition the
+# file checks the output of each command and if the command fails it deletes the
+# output files.
+
+# Input variables
+#
+# verbose:BOOL=<> OFF: Be as quiet as possible (default)
+# ON : Describe each step
+#
+# build_configuration:STRING=<> Typically one of Debug, MinSizeRel, Release, or
+# RelWithDebInfo, but it should match one of the
+# entries in CUDA_HOST_FLAGS. This is the build
+# configuration used when compiling the code. If
+# blank or unspecified Debug is assumed as this is
+# what CMake does.
+#
+# generated_file:STRING=<> File to generate. This argument must be passed in.
+#
+# generated_cubin_file:STRING=<> File to generate. This argument must be passed
+# in if build_cubin is true.
+
+if(NOT generated_file)
+ message(FATAL_ERROR "You must specify generated_file on the command line")
+endif()
+
+# Set these up as variables to make reading the generated file easier
+set(CMAKE_COMMAND "@CMAKE_COMMAND@")
+set(source_file "@source_file@")
+set(NVCC_generated_dependency_file "@NVCC_generated_dependency_file@")
+set(cmake_dependency_file "@cmake_dependency_file@")
+set(CUDA_make2cmake "@CUDA_make2cmake@")
+set(CUDA_parse_cubin "@CUDA_parse_cubin@")
+set(build_cubin @build_cubin@)
+# We won't actually use these variables for now, but we need to set this, in
+# order to force this file to be run again if it changes.
+set(generated_file_path "@generated_file_path@")
+set(generated_file_internal "@generated_file@")
+set(generated_cubin_file_internal "@generated_cubin_file@")
+
+set(CUDA_NVCC_EXECUTABLE "@CUDA_NVCC_EXECUTABLE@")
+set(CUDA_NVCC_FLAGS "@CUDA_NVCC_FLAGS@;;@CUDA_WRAP_OPTION_NVCC_FLAGS@")
+@CUDA_NVCC_FLAGS_CONFIG@
+set(nvcc_flags "@nvcc_flags@")
+set(CUDA_NVCC_INCLUDE_ARGS "@CUDA_NVCC_INCLUDE_ARGS@")
+set(format_flag "@format_flag@")
+
+if(build_cubin AND NOT generated_cubin_file)
+ message(FATAL_ERROR "You must specify generated_cubin_file on the command line")
+endif()
+
+# This is the list of host compilation flags. It C or CXX should already have
+# been chosen by FindCUDA.cmake.
+@CUDA_HOST_FLAGS@
+
+# Take the compiler flags and package them up to be sent to the compiler via -Xcompiler
+set(nvcc_host_compiler_flags "")
+# If we weren't given a build_configuration, use Debug.
+if(NOT build_configuration)
+ set(build_configuration Debug)
+endif()
+string(TOUPPER "${build_configuration}" build_configuration)
+#message("CUDA_NVCC_HOST_COMPILER_FLAGS = ${CUDA_NVCC_HOST_COMPILER_FLAGS}")
+foreach(flag ${CMAKE_HOST_FLAGS} ${CMAKE_HOST_FLAGS_${build_configuration}})
+ # Extra quotes are added around each flag to help nvcc parse out flags with spaces.
+ set(nvcc_host_compiler_flags "${nvcc_host_compiler_flags},\"${flag}\"")
+endforeach()
+if (nvcc_host_compiler_flags)
+ set(nvcc_host_compiler_flags "-Xcompiler" ${nvcc_host_compiler_flags})
+endif()
+#message("nvcc_host_compiler_flags = \"${nvcc_host_compiler_flags}\"")
+# Add the build specific configuration flags
+list(APPEND CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS_${build_configuration}})
+
+if(DEFINED CCBIN)
+ set(CCBIN -ccbin "${CCBIN}")
+endif()
+
+# cuda_execute_process - Executes a command with optional command echo and status message.
+#
+# status - Status message to print if verbose is true
+# command - COMMAND argument from the usual execute_process argument structure
+# ARGN - Remaining arguments are the command with arguments
+#
+# CUDA_result - return value from running the command
+#
+# Make this a macro instead of a function, so that things like RESULT_VARIABLE
+# and other return variables are present after executing the process.
+macro(cuda_execute_process status command)
+ set(_command ${command})
+ if(NOT _command STREQUAL "COMMAND")
+ message(FATAL_ERROR "Malformed call to cuda_execute_process. Missing COMMAND as second argument. (command = ${command})")
+ endif()
+ if(verbose)
+ execute_process(COMMAND "${CMAKE_COMMAND}" -E echo -- ${status})
+ # Now we need to build up our command string. We are accounting for quotes
+ # and spaces, anything else is left up to the user to fix if they want to
+ # copy and paste a runnable command line.
+ set(cuda_execute_process_string)
+ foreach(arg ${ARGN})
+ # If there are quotes, excape them, so they come through.
+ string(REPLACE "\"" "\\\"" arg ${arg})
+ # Args with spaces need quotes around them to get them to be parsed as a single argument.
+ if(arg MATCHES " ")
+ list(APPEND cuda_execute_process_string "\"${arg}\"")
+ else()
+ list(APPEND cuda_execute_process_string ${arg})
+ endif()
+ endforeach()
+ # Echo the command
+ execute_process(COMMAND ${CMAKE_COMMAND} -E echo ${cuda_execute_process_string})
+ endif(verbose)
+ # Run the command
+ execute_process(COMMAND ${ARGN} RESULT_VARIABLE CUDA_result )
+endmacro()
+
+# Delete the target file
+cuda_execute_process(
+ "Removing ${generated_file}"
+ COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
+ )
+
+# Make sure the output directory is present
+cuda_execute_process(
+ "Creating output directory: ${generated_file_path}"
+ COMMAND "${CMAKE_COMMAND}" -E make_directory "${generated_file_path}"
+ )
+
+# Generate the dependency file
+cuda_execute_process(
+ "Generating dependency file: ${NVCC_generated_dependency_file}"
+ COMMAND "${CUDA_NVCC_EXECUTABLE}"
+ "${source_file}"
+ ${CUDA_NVCC_FLAGS}
+ ${nvcc_flags}
+ ${CCBIN}
+ ${nvcc_host_compiler_flags}
+ -DNVCC
+ -M
+ -o "${NVCC_generated_dependency_file}"
+ ${CUDA_NVCC_INCLUDE_ARGS}
+ )
+
+if(CUDA_result)
+ message(FATAL_ERROR "Error generating ${generated_file}")
+endif()
+
+# Generate the cmake readable dependency file to a temp file. Don't put the
+# quotes just around the filenames for the input_file and output_file variables.
+# CMake will pass the quotes through and not be able to find the file.
+cuda_execute_process(
+ "Generating temporary cmake readable file: ${cmake_dependency_file}.tmp"
+ COMMAND "${CMAKE_COMMAND}"
+ -D "input_file:FILEPATH=${NVCC_generated_dependency_file}"
+ -D "output_file:FILEPATH=${cmake_dependency_file}.tmp"
+ -P "${CUDA_make2cmake}"
+ )
+
+if(CUDA_result)
+ message(FATAL_ERROR "Error generating ${generated_file}")
+endif()
+
+# Copy the file if it is different
+cuda_execute_process(
+ "Copy if different ${cmake_dependency_file}.tmp to ${cmake_dependency_file}"
+ COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${cmake_dependency_file}.tmp" "${cmake_dependency_file}"
+ )
+
+if(CUDA_result)
+ message(FATAL_ERROR "Error generating ${generated_file}")
+endif()
+
+# Delete the temporary file
+cuda_execute_process(
+ "Removing ${cmake_dependency_file}.tmp and ${NVCC_generated_dependency_file}"
+ COMMAND "${CMAKE_COMMAND}" -E remove "${cmake_dependency_file}.tmp" "${NVCC_generated_dependency_file}"
+ )
+
+if(CUDA_result)
+ message(FATAL_ERROR "Error generating ${generated_file}")
+endif()
+
+# Generate the code
+cuda_execute_process(
+ "Generating ${generated_file}"
+ COMMAND "${CUDA_NVCC_EXECUTABLE}"
+ "${source_file}"
+ ${CUDA_NVCC_FLAGS}
+ ${nvcc_flags}
+ ${CCBIN}
+ ${nvcc_host_compiler_flags}
+ -DNVCC
+ ${format_flag} -o "${generated_file}"
+ ${CUDA_NVCC_INCLUDE_ARGS}
+ )
+
+if(CUDA_result)
+ # Since nvcc can sometimes leave half done files make sure that we delete the output file.
+ cuda_execute_process(
+ "Removing ${generated_file}"
+ COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
+ )
+ message(FATAL_ERROR "Error generating file ${generated_file}")
+else()
+ if(verbose)
+ message("Generated ${generated_file} successfully.")
+ endif()
+endif()
+
+# Cubin resource report commands.
+if( build_cubin )
+ # Run with -cubin to produce resource usage report.
+ cuda_execute_process(
+ "Generating ${generated_cubin_file}"
+ COMMAND "${CUDA_NVCC_EXECUTABLE}"
+ "${source_file}"
+ ${CUDA_NVCC_FLAGS}
+ ${nvcc_flags}
+ ${CCBIN}
+ ${nvcc_host_compiler_flags}
+ -DNVCC
+ -cubin
+ -o "${generated_cubin_file}"
+ ${CUDA_NVCC_INCLUDE_ARGS}
+ )
+
+ # Execute the parser script.
+ cuda_execute_process(
+ "Executing the parser script"
+ COMMAND "${CMAKE_COMMAND}"
+ -D "input_file:STRING=${generated_cubin_file}"
+ -P "${CUDA_parse_cubin}"
+ )
+
+endif( build_cubin )
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
index 25a056a..3d8ae3a 100644
--- a/Modules/FindCURL.cmake
+++ b/Modules/FindCURL.cmake
@@ -5,6 +5,19 @@
# CURL_LIBRARIES - List of libraries when using curl.
# CURL_FOUND - True if curl found.
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Look for the header file.
FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h)
MARK_AS_ADVANCED(CURL_INCLUDE_DIR)
diff --git a/Modules/FindCVS.cmake b/Modules/FindCVS.cmake
index ee3d863..ff97762 100644
--- a/Modules/FindCVS.cmake
+++ b/Modules/FindCVS.cmake
@@ -7,6 +7,19 @@
# message("CVS found: ${CVS_EXECUTABLE}")
# endif(CVS_FOUND)
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# CVSNT
get_filename_component(
diff --git a/Modules/FindCoin3D.cmake b/Modules/FindCoin3D.cmake
index e42d3e4..82d216a 100644
--- a/Modules/FindCoin3D.cmake
+++ b/Modules/FindCoin3D.cmake
@@ -8,7 +8,19 @@
# COIN3D_INCLUDE_DIRS - where the Inventor include directory can be found
# COIN3D_LIBRARIES - Link to this to use Coin3D
#
-
+
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
IF (WIN32)
IF (CYGWIN)
diff --git a/Modules/FindCups.cmake b/Modules/FindCups.cmake
index 143cae9..5efc45b 100644
--- a/Modules/FindCups.cmake
+++ b/Modules/FindCups.cmake
@@ -7,11 +7,19 @@
# Set CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE to TRUE if you need a version which
# features this function (i.e. at least 1.1.19)
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
INCLUDE(CheckLibraryExists)
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index 6e12379..fa68190 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -12,6 +12,19 @@
# Set CURSES_NEED_NCURSES to TRUE before the FIND_PACKAGE() command if NCurses
# functionality is required.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_LIBRARY(CURSES_CURSES_LIBRARY NAMES curses )
FIND_LIBRARY(CURSES_NCURSES_LIBRARY NAMES ncurses )
diff --git a/Modules/FindCxxTest.cmake b/Modules/FindCxxTest.cmake
index c31fc13..5abf992 100644
--- a/Modules/FindCxxTest.cmake
+++ b/Modules/FindCxxTest.cmake
@@ -64,6 +64,20 @@
# };
#
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+# Copyright 2008-2009 Philip Lowman <philip@yhbt.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Version 1.2 (3/2/08)
# Included patch from Tyler Roscoe to have the perl & python binaries
# detected based on CXXTEST_INCLUDE_DIR
@@ -75,14 +89,6 @@
# Fixed CXXTEST_INCLUDE_DIRS so it will work properly
# Eliminated superfluous CXXTEST_FOUND assignment
# Cleaned up and added more documentation
-#
-# FindCxxTest.cmake
-# Copyright (c) 2008-2009
-# Philip Lowman <philip@yhbt.com>
-#
-# Redistribution AND use is allowed according to the terms of the New
-# BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#=============================================================
# CXXTEST_ADD_TEST (public macro)
diff --git a/Modules/FindCygwin.cmake b/Modules/FindCygwin.cmake
index def439e..5b2bc59 100644
--- a/Modules/FindCygwin.cmake
+++ b/Modules/FindCygwin.cmake
@@ -1,6 +1,19 @@
# - this module looks for Cygwin
#
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF (WIN32)
FIND_PATH(CYGWIN_INSTALL_PATH
cygwin.bat
diff --git a/Modules/FindDCMTK.cmake b/Modules/FindDCMTK.cmake
index 5a35d24..335826b 100644
--- a/Modules/FindDCMTK.cmake
+++ b/Modules/FindDCMTK.cmake
@@ -10,6 +10,20 @@
# directories and compiled libraries if you've just compiled it in the
# source tree. Just set it to the root of the tree where you extracted
# the source.
+
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
#
# Written for VXL by Amitha Perera.
#
diff --git a/Modules/FindDart.cmake b/Modules/FindDart.cmake
index 35f6eb8..f8c2747 100644
--- a/Modules/FindDart.cmake
+++ b/Modules/FindDart.cmake
@@ -3,6 +3,19 @@
# to point to where it found it.
#
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PATH(DART_ROOT README.INSTALL
$ENV{DART_ROOT}
${PROJECT_SOURCE_DIR}/Dart
diff --git a/Modules/FindDevIL.cmake b/Modules/FindDevIL.cmake
index 0afad3a..ae0f97d 100644
--- a/Modules/FindDevIL.cmake
+++ b/Modules/FindDevIL.cmake
@@ -8,7 +8,20 @@
# IL_INCLUDE_DIR where to find the il.h, ilu.h and ilut.h files.
# IL_FOUND this is set to TRUE if all the above variables were set. This will be set to false if ILU or ILUT are not found, even if they are not needed. In most systems, if one library is found all the others are as well. That's the way the DevIL developers release it.
-# Original file by: Christopher Harvey
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+# Copyright 2008 Christopher Harvey
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# TODO: Add version support.
# Tested under Linux and Windows (MSVC)
diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake
index 2cbe7b4..5e5ed13 100644
--- a/Modules/FindDoxygen.cmake
+++ b/Modules/FindDoxygen.cmake
@@ -18,6 +18,19 @@
#
#
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# For backwards compatibility support
IF(Doxygen_FIND_QUIETLY)
SET(DOXYGEN_FIND_QUIETLY TRUE)
diff --git a/Modules/FindEXPAT.cmake b/Modules/FindEXPAT.cmake
index ee804e1..1c4c163 100644
--- a/Modules/FindEXPAT.cmake
+++ b/Modules/FindEXPAT.cmake
@@ -5,6 +5,19 @@
# EXPAT_LIBRARIES - List of libraries when using expat.
# EXPAT_FOUND - True if expat found.
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Look for the header file.
FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h)
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index b36fd2e..b9df065 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -44,32 +44,19 @@
# )
#====================================================================
-# Copyright (c) 2006, Tristan Carel
-# All rights reserved.
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2006 Tristan Carel
#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the University of California, Berkeley nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# $Id$
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
FIND_PROGRAM(FLEX_EXECUTABLE flex DOC "path to the flex executable")
MARK_AS_ADVANCED(FLEX_EXECUTABLE)
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index 8edc00b..02b2015 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -29,6 +29,19 @@
# FLTK_FORMS_LIBRARY = the full path to fltk_forms.lib
# FLTK_IMAGES_LIBRARY = the full path to fltk_images.lib
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(NOT FLTK_SKIP_OPENGL)
FIND_PACKAGE(OpenGL)
ENDIF()
diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake
index a434758..6411ccb 100644
--- a/Modules/FindFLTK2.cmake
+++ b/Modules/FindFLTK2.cmake
@@ -10,6 +10,19 @@
# FLTK2_GL_LIBRARY = the full path to fltk2_gl.lib
# FLTK2_IMAGES_LIBRARY = the full path to fltk2_images.lib
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
SET (FLTK2_DIR $ENV{FLTK2_DIR} )
# Platform dependent libraries required by FLTK2
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index 3c83bfa..0a6f93e 100644
--- a/Modules/FindFreetype.cmake
+++ b/Modules/FindFreetype.cmake
@@ -11,6 +11,19 @@
# correspond to the ./configure --prefix=$FREETYPE_DIR
# used in building FREETYPE.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Created by Eric Wing.
# Modifications by Alexander Neundorf.
# This file has been renamed to "FindFreetype.cmake" instead of the correct
diff --git a/Modules/FindGCCXML.cmake b/Modules/FindGCCXML.cmake
index 594f970..d618487 100644
--- a/Modules/FindGCCXML.cmake
+++ b/Modules/FindGCCXML.cmake
@@ -1,4 +1,18 @@
# - Find the GCC-XML front-end executable.
+
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PROGRAM(GCCXML
NAMES gccxml
../GCC_XML/gccxml
diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake
index e69ee3f..d3b198a 100644
--- a/Modules/FindGDAL.cmake
+++ b/Modules/FindGDAL.cmake
@@ -9,6 +9,20 @@
# GDAL_FOUND - True if libgdal is found
# GDAL_LIBRARY - A variable pointing to the GDAL library
# GDAL_INCLUDE_DIR - Where to find the headers
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
#
# $GDALDIR is an environment variable that would
# correspond to the ./configure --prefix=$GDAL_DIR
diff --git a/Modules/FindGIF.cmake b/Modules/FindGIF.cmake
index 1d3a5ec..36bf1dc 100644
--- a/Modules/FindGIF.cmake
+++ b/Modules/FindGIF.cmake
@@ -6,6 +6,19 @@
# $GIF_DIR is an environment variable that would
# correspond to the ./configure --prefix=$GIF_DIR
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Created by Eric Wing.
# Modifications by Alexander Neundorf
diff --git a/Modules/FindGLU.cmake b/Modules/FindGLU.cmake
index fa56a51..96b6dc9 100644
--- a/Modules/FindGLU.cmake
+++ b/Modules/FindGLU.cmake
@@ -1,4 +1,16 @@
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# Use of this file is deprecated, and is here for backwards compatibility with CMake 1.4
# GLU library is now found by FindOpenGL.cmake
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index c838b01..baf539a 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -7,6 +7,19 @@
# GLUT_Xmu_LIBRARY = the full path to the Xmu library.
# GLUT_Xi_LIBRARY = the full path to the Xi Library.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF (WIN32)
FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
PATHS ${GLUT_ROOT_PATH}/include )
diff --git a/Modules/FindGTK.cmake b/Modules/FindGTK.cmake
index 7d80241..75890df 100644
--- a/Modules/FindGTK.cmake
+++ b/Modules/FindGTK.cmake
@@ -4,6 +4,19 @@
# GTK_FOUND - GTK was found
# GTK_GL_FOUND - GTK's GL features were found
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# don't even bother under WIN32
IF(UNIX)
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 7d58ae4..39beae9 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -50,10 +50,20 @@
# endif()
#
-#
-# Copyright (c) 2008-2009
-# Philip Lowman <philip@yhbt.com>
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2008-2009 Philip Lowman <philip@yhbt.com>
#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Version 0.7 (3/22/09)
# * Checked into CMake CVS
# * Added versioning support
@@ -70,10 +80,6 @@
# Added GTK2_SKIP_MARK_AS_ADVANCED option
# Version 0.5 (12/19/08)
# Second release to cmake mailing list
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
#=============================================================
# _GTK2_GET_VERSION
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index 30e67d3..4960b38 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -4,66 +4,152 @@
#
# GTEST_FOUND - Found the Google Testing framework
# GTEST_INCLUDE_DIRS - Include directories
-# GTEST_LIBRARIES - The GTest library
-# GTEST_MAIN_LIBRARIES - The GTest library for automatic main()
#
-# Accepts the following CMake/Environment variables as input:
+# Also defines the library variables below as normal
+# variables. These contain debug/optimized keywords when
+# a debugging library is found.
#
-# GTEST_ROOT - The root directory of the gtest install prefix
+# GTEST_BOTH_LIBRARIES - Both libgtest & libgtest-main
+# GTEST_LIBRARIES - libgtest
+# GTEST_MAIN_LIBRARIES - libgtest-main
#
+# Accepts the following variables as input:
+#
+# GTEST_ROOT - (as CMake or env. variable)
+# The root directory of the gtest install prefix
+#
+# GTEST_MSVC_SEARCH - If on MSVC, enables searching the build tree of
+# GTest if set to MD or MT (defaults: MD)
+#
+#-----------------------
+# Example Usage:
+#
+# enable_testing(true)
+# find_package(GTest REQUIRED)
+# include_directories(${GTEST_INCLUDE_DIRS})
+#
+# add_executable(foo foo.cc)
+# target_link_libraries(foo ${GTEST_BOTH_LIBRARIES})
+#
+# add_test(AllTestsInFoo foo)
+#
+#-----------------------
+#
+# If you would like each Google test to show up in CTest as
+# a test you may use the following macro. NOTE: It WILL slow
+# down your tests, so be warned.
+#
+# GTEST_ADD_TESTS(executable extra_args ARGN)
+# executable = The path to the test executable
+# extra_args = Pass a list of extra arguments to be passed to
+# executable enclosed in quotes (or "" for none)
+# ARGN = A list of source files to search for tests & test
+# fixtures.
+#
+# Example:
+# set(FooTestArgs --foo 1 --bar 2)
+# add_executable(FooTest FooUnitTest.cc)
+# GTEST_ADD_TESTS(FooTest "${FooTestArgs}" FooUnitTest.cc)
-# Copyright (c) 2009, Philip Lowman <philip@yhbt.com>
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2009 Philip Lowman <philip@yhbt.com>
+# Copyright 2009 Daniel Blezek <blezek@gmail.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
#
-# Redistribution AND use is allowed according to the terms of the New
-# BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+#
+# Thanks to Daniel Blezek <blezek@gmail.com> for the GTEST_ADD_TESTS code
-find_path(GTEST_INCLUDE_DIR gtest/gtest.h
- HINTS
- $ENV{GTEST_ROOT}/include
- ${GTEST_ROOT}/include
-)
+function(GTEST_ADD_TESTS executable extra_args)
+ if(NOT ARGN)
+ message(FATAL_ERROR "Missing ARGN: Read the documentation for GTEST_ADD_TESTS")
+ endif()
+ foreach(source ${ARGN})
+ file(READ "${source}" contents)
+ string(REGEX MATCHALL "TEST_?F?\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
+ foreach(hit ${found_tests})
+ string(REGEX REPLACE ".*\\(([A-Za-z_0-9]+)[, ]*([A-Za-z_0-9]+)\\).*" "\\1.\\2" test_name ${hit})
+ add_test(${test_name} ${executable} --gtest_filter=${test_name} ${extra_args})
+ endforeach()
+ endforeach()
+endfunction()
-function(_gtest_find_library _name _library)
- find_library(${_name} ${_library}
- HINTS
- $ENV{GTEST_ROOT}
- ${GTEST_ROOT}
- PATH_SUFFIXES lib64 lib
- )
+function(_gtest_append_debugs _endvar _library)
+ if(${_library} AND ${_library}_DEBUG)
+ set(_output optimized ${${_library}} debug ${${_library}_DEBUG})
+ else()
+ set(_output ${${_library}})
+ endif()
+ set(${_endvar} ${_output} PARENT_SCOPE)
endfunction()
-_gtest_find_library(GTEST_LIBRARY gtest)
-_gtest_find_library(GTEST_LIBRARY_DEBUG gtestd)
-_gtest_find_library(GTEST_MAIN_LIBRARY gtest_main)
-_gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind)
+function(_gtest_find_library _name)
+ find_library(${_name}
+ NAMES ${ARGN}
+ HINTS
+ $ENV{GTEST_ROOT}
+ ${GTEST_ROOT}
+ PATH_SUFFIXES ${_gtest_libpath_suffixes}
+ )
+ mark_as_advanced(${_name})
+endfunction()
-mark_as_advanced(GTEST_INCLUDE_DIR)
-mark_as_advanced(GTEST_LIBRARY)
-mark_as_advanced(GTEST_LIBRARY_DEBUG)
-mark_as_advanced(GTEST_MAIN_LIBRARY)
-mark_as_advanced(GTEST_MAIN_LIBRARY_DEBUG)
+#
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTEST DEFAULT_MSG GTEST_INCLUDE_DIR GTEST_LIBRARY GTEST_MAIN_LIBRARY)
+if(NOT DEFINED GTEST_MSVC_SEARCH)
+ set(GTEST_MSVC_SEARCH MD)
+endif()
-set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIR})
+set(_gtest_libpath_suffixes lib)
+if(MSVC)
+ if(GTEST_MSVC_SEARCH STREQUAL "MD")
+ list(APPEND _gtest_libpath_suffixes
+ msvc/gtest-md/Debug
+ msvc/gtest-md/Release)
+ elseif(GTEST_MSVC_SEARCH STREQUAL "MT")
+ list(APPEND _gtest_libpath_suffixes
+ msvc/gtest/Debug
+ msvc/gtest/Release)
+ endif()
+endif()
-# Have *_LIBRARIES contain debug/release keywords if DEBUG library is available
-if(GTEST_LIBRARY AND GTEST_LIBRARY_DEBUG)
- set(GTEST_LIBRARIES
- optimized ${GTEST_LIBRARY}
- debug ${GTEST_LIBRARY_DEBUG})
+find_path(GTEST_INCLUDE_DIR gtest/gtest.h
+ HINTS
+ $ENV{GTEST_ROOT}/include
+ ${GTEST_ROOT}/include
+)
+mark_as_advanced(GTEST_INCLUDE_DIR)
+
+if(MSVC AND GTEST_MSVC_SEARCH STREQUAL "MD")
+ # The provided /MD project files for Google Test add -md suffixes to the
+ # library names.
+ _gtest_find_library(GTEST_LIBRARY gtest-md gtest)
+ _gtest_find_library(GTEST_LIBRARY_DEBUG gtest-mdd gtestd)
+ _gtest_find_library(GTEST_MAIN_LIBRARY gtest_main-md gtest_main)
+ _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_main-mdd gtest_maind)
else()
- set(GTEST_LIBRARIES ${GTEST_LIBRARY})
+ _gtest_find_library(GTEST_LIBRARY gtest)
+ _gtest_find_library(GTEST_LIBRARY_DEBUG gtestd)
+ _gtest_find_library(GTEST_MAIN_LIBRARY gtest_main)
+ _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind)
endif()
-if(GTEST_MAIN_LIBRARY AND GTEST_MAIN_LIBRARY_DEBUG)
- set(GTEST_MAIN_LIBRARIES
- optimized ${GTEST_MAIN_LIBRARY}
- debug ${GTEST_MAIN_LIBRARY_DEBUG})
-else()
- set(GTEST_MAIN_LIBRARIES ${GTEST_MAIN_LIBRARY})
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTest DEFAULT_MSG GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
+
+if(GTEST_FOUND)
+ set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIR})
+ _gtest_append_debugs(GTEST_LIBRARIES GTEST_LIBRARY)
+ _gtest_append_debugs(GTEST_MAIN_LIBRARIES GTEST_MAIN_LIBRARY)
+ set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
endif()
diff --git a/Modules/FindGettext.cmake b/Modules/FindGettext.cmake
index c7dee52..cdef44f 100644
--- a/Modules/FindGettext.cmake
+++ b/Modules/FindGettext.cmake
@@ -12,7 +12,18 @@
# ALL option is used, the translations will also be created when
# building the default target.
-
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
diff --git a/Modules/FindGnuTLS.cmake b/Modules/FindGnuTLS.cmake
index 50d596b..a70823f 100644
--- a/Modules/FindGnuTLS.cmake
+++ b/Modules/FindGnuTLS.cmake
@@ -7,15 +7,22 @@
# GNUTLS_LIBRARIES - The libraries needed to use gnutls
# GNUTLS_DEFINITIONS - Compiler switches required for using gnutls
-# Adapted from FindXml2.cmake, which is:
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2009 Philip Lowman <philip@yhbt.com>
+# Copyright 2009 Brad Hards <bradh@kde.org>
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Changes are Copyright 2009, Brad Hards, <bradh@kde.org>
-# Copyright 2009, Philip Lowman, <philip@yhbt.com>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Note that this doesn't try to find the gnutls-extra package.
diff --git a/Modules/FindGnuplot.cmake b/Modules/FindGnuplot.cmake
index c12ebb7..a9b9ee5 100644
--- a/Modules/FindGnuplot.cmake
+++ b/Modules/FindGnuplot.cmake
@@ -5,6 +5,19 @@
# GNUPLOT_FOUND - system has Gnuplot
# GNUPLOT_EXECUTABLE - the Gnuplot executable
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(FindCygwin)
FIND_PROGRAM(GNUPLOT_EXECUTABLE
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index e411d19..277cbfa 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -40,6 +40,19 @@
# HDF5_CXX_COMPILER_EXECUTABLE - the path to the HDF5 C++ wrapper compiler
# HDF5_DIFF_EXECUTABLE - the path to the HDF5 dataset comparison tool
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This module is maintained by Will Dicharry <wdicharry@stellarscience.com>.
include(SelectLibraryConfigurations)
diff --git a/Modules/FindHSPELL.cmake b/Modules/FindHSPELL.cmake
index fa5c275..9ae4a52 100644
--- a/Modules/FindHSPELL.cmake
+++ b/Modules/FindHSPELL.cmake
@@ -6,11 +6,19 @@
# HSPELL_LIBRARIES - The libraries needed to use HSPELL
# HSPELL_DEFINITIONS - Compiler switches required for using HSPELL
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
IF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
# Already in cache, be silent
diff --git a/Modules/FindHTMLHelp.cmake b/Modules/FindHTMLHelp.cmake
index faa35c4..2deb297 100644
--- a/Modules/FindHTMLHelp.cmake
+++ b/Modules/FindHTMLHelp.cmake
@@ -5,6 +5,19 @@
# HTML_HELP_LIBRARY : full path to the library (htmlhelp.lib)
#
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(WIN32)
FIND_PROGRAM(HTML_HELP_COMPILER
diff --git a/Modules/FindITK.cmake b/Modules/FindITK.cmake
index 2e2b034..40f03fb 100644
--- a/Modules/FindITK.cmake
+++ b/Modules/FindITK.cmake
@@ -20,6 +20,18 @@
# compatability. Use ITK_USE_FILE
# instead.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
SET(ITK_DIR_STRING "directory containing ITKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/InsightToolkit for an installation.")
diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
index bba9e41..33b8aad 100644
--- a/Modules/FindImageMagick.cmake
+++ b/Modules/FindImageMagick.cmake
@@ -50,11 +50,19 @@
# Note that the standard FIND_PACKAGE features are supported
# (i.e., QUIET, REQUIRED, etc.).
-# Copyright (c) 2007-2008,
-# Miguel A. Figueroa-Villanueva, miguelf at ieee dot org.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+# Copyright 2007-2008 Miguel A. Figueroa-Villanueva <miguelf at ieee dot org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
#---------------------------------------------------------------------
# Helper functions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index e072f21..8c9523a 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -12,6 +12,53 @@
# JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
#
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Expand {libarch} occurences to java_libarch subdirectory(-ies) and set ${_var}
+MACRO(java_append_library_directories _var)
+ # Determine java arch-specific library subdir
+ IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
+ # Based on openjdk/jdk/make/common/shared/Platform.gmk as of 6b16
+ # and kaffe as of 1.1.8 which uses the first part of the
+ # GNU config.guess platform triplet.
+ IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^i[3-9]86$")
+ SET(_java_libarch "i386")
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ SET(_java_libarch "amd64" "x86_64")
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc")
+ SET(_java_libarch "ppc" "powerpc" "ppc64")
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")
+ SET(_java_libarch "sparc" "sparcv9")
+ ELSE(CMAKE_SYSTEM_PROCESSOR MATCHES "^i[3-9]86$")
+ SET(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}")
+ ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^i[3-9]86$")
+ ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ SET(_java_libarch "i386" "amd64" "ppc") # previous default
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+
+ FOREACH(_path ${ARGN})
+ IF(_path MATCHES "{libarch}")
+ FOREACH(_libarch ${_java_libarch})
+ STRING(REPLACE "{libarch}" "${_libarch}" _newpath "${_path}")
+ LIST(APPEND ${_var} "${_newpath}")
+ ENDFOREACH(_libarch)
+ ELSE(_path MATCHES "{libarch}")
+ LIST(APPEND ${_var} "${_path}")
+ ENDIF(_path MATCHES "{libarch}")
+ ENDFOREACH(_path)
+ENDMACRO(java_append_library_directories)
+
GET_FILENAME_COMPONENT(java_install_version
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit;CurrentVersion]" NAME)
@@ -19,45 +66,29 @@ SET(JAVA_AWT_LIBRARY_DIRECTORIES
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/lib"
- $ENV{JAVA_HOME}/jre/lib/alpha
- $ENV{JAVA_HOME}/jre/lib/amd64
- $ENV{JAVA_HOME}/jre/lib/arm
- $ENV{JAVA_HOME}/jre/lib/i386
- $ENV{JAVA_HOME}/jre/lib/ia64
- $ENV{JAVA_HOME}/jre/lib/m68k
- $ENV{JAVA_HOME}/jre/lib/mips
- $ENV{JAVA_HOME}/jre/lib/mipsel
- $ENV{JAVA_HOME}/jre/lib/parisc
- $ENV{JAVA_HOME}/jre/lib/powerpc
- $ENV{JAVA_HOME}/jre/lib/ppc
- $ENV{JAVA_HOME}/jre/lib/s390
- $ENV{JAVA_HOME}/jre/lib/sparc
- $ENV{JAVA_HOME}/jre/lib/x86_64
+ )
+JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
+ $ENV{JAVA_HOME}/jre/lib/{libarch}
+ $ENV{JAVA_HOME}/jre/lib
$ENV{JAVA_HOME}/lib
+ $ENV{JAVA_HOME}
/usr/lib
/usr/local/lib
/usr/lib/jvm/java/lib
- /usr/lib/java/jre/lib/i386
- /usr/local/lib/java/jre/lib/i386
- /usr/local/share/java/jre/lib/i386
- /usr/lib/j2sdk1.4-sun/jre/lib/i386
- /usr/lib/j2sdk1.5-sun/jre/lib/i386
- /opt/sun-jdk-1.5.0.04/jre/lib/amd64
- /usr/lib/jvm/java-6-sun/jre/lib/i386
- /usr/lib/jvm/java-6-sun/jre/lib/amd64
- /usr/lib/jvm/java-1.5.0-sun/jre/lib/i386
- /usr/lib/jvm/java-1.5.0-sun/jre/lib/amd64
- /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/amd64 # can this one be removed according to #8821 ? Alex
- /usr/lib/java/jre/lib/amd64
- /usr/local/lib/java/jre/lib/amd64
- /usr/local/share/java/jre/lib/amd64
- /usr/lib/j2sdk1.4-sun/jre/lib/amd64
- /usr/lib/j2sdk1.5-sun/jre/lib/amd64
- /usr/lib/java/jre/lib/ppc
- /usr/local/lib/java/jre/lib/ppc
- /usr/local/share/java/jre/lib/ppc
- /usr/lib/j2sdk1.4-sun/jre/lib/ppc
- /usr/lib/j2sdk1.5-sun/jre/lib/ppc
+ /usr/lib/java/jre/lib/{libarch}
+ /usr/local/lib/java/jre/lib/{libarch}
+ /usr/local/share/java/jre/lib/{libarch}
+ /usr/lib/j2sdk1.4-sun/jre/lib/{libarch}
+ /usr/lib/j2sdk1.5-sun/jre/lib/{libarch}
+ /opt/sun-jdk-1.5.0.04/jre/lib/{libarch}
+ /usr/lib/jvm/java-6-sun/jre/lib/{libarch}
+ /usr/lib/jvm/java-1.5.0-sun/jre/lib/{libarch}
+ /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/{libarch} # can this one be removed according to #8821 ? Alex
+ /usr/lib/jvm/java-6-openjdk/jre/lib/{libarch}
+ # Debian specific paths for default JVM
+ /usr/lib/jvm/default-java/jre/lib/{libarch}
+ /usr/lib/jvm/default-java/jre/lib
+ /usr/lib/jvm/default-java/lib
)
SET(JAVA_JVM_LIBRARY_DIRECTORIES)
@@ -84,10 +115,13 @@ SET(JAVA_AWT_INCLUDE_DIRECTORIES
/usr/lib/jvm/java-6-sun/include
/usr/lib/jvm/java-1.5.0-sun/include
/usr/lib/jvm/java-6-sun-1.6.0.00/include # can this one be removed according to #8821 ? Alex
+ /usr/lib/jvm/java-6-openjdk/include
/usr/local/share/java/include
/usr/lib/j2sdk1.4-sun/include
/usr/lib/j2sdk1.5-sun/include
/opt/sun-jdk-1.5.0.04/include
+ # Debian specific path for default JVM
+ /usr/lib/jvm/default-java/include
)
FOREACH(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}")
diff --git a/Modules/FindJPEG.cmake b/Modules/FindJPEG.cmake
index 9849294..299e458 100644
--- a/Modules/FindJPEG.cmake
+++ b/Modules/FindJPEG.cmake
@@ -7,6 +7,19 @@
# also defined, but not for general use are
# JPEG_LIBRARY, where to find the JPEG library.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PATH(JPEG_INCLUDE_DIR jpeglib.h)
SET(JPEG_NAMES ${JPEG_NAMES} jpeg)
diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake
index d83fe7b..553654e 100644
--- a/Modules/FindJasper.cmake
+++ b/Modules/FindJasper.cmake
@@ -5,11 +5,19 @@
# JASPER_INCLUDE_DIR - the Jasper include directory
# JASPER_LIBRARIES - The libraries needed to use Jasper
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
FIND_PACKAGE(JPEG)
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index a594450..4fddfee 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -7,6 +7,20 @@
# JAVA_COMPILE = the full path to the Java compiler
# JAVA_ARCHIVE = the full path to the Java archiver
#
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
SET(JAVA_BIN_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\2.0;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.9;JavaHome]/bin"
diff --git a/Modules/FindKDE3.cmake b/Modules/FindKDE3.cmake
index 0ae94dc..5c5c5fe 100644
--- a/Modules/FindKDE3.cmake
+++ b/Modules/FindKDE3.cmake
@@ -63,6 +63,20 @@
#
# Author: Alexander Neundorf <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(NOT UNIX AND KDE3_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Compiling KDE3 applications and libraries under Windows is not supported")
ENDIF(NOT UNIX AND KDE3_FIND_REQUIRED)
diff --git a/Modules/FindKDE4.cmake b/Modules/FindKDE4.cmake
index 25c8d8a..12fd304 100644
--- a/Modules/FindKDE4.cmake
+++ b/Modules/FindKDE4.cmake
@@ -9,6 +9,20 @@
#
# Author: Alexander Neundorf <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# If Qt3 has already been found, fail.
IF(QT_QT_LIBRARY)
IF(KDE4_FIND_REQUIRED)
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index 5505f86..b89a997 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -22,6 +22,20 @@
# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
### List of vendors (BLA_VENDOR) valid in this module
## Intel(mkl), ACML,Apple, NAS, Generic
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
if(NOT _LANGUAGES_ MATCHES Fortran)
if(LAPACK_FIND_REQUIRED)
diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake
index a02d9e1..dbd96a7 100644
--- a/Modules/FindLATEX.cmake
+++ b/Modules/FindLATEX.cmake
@@ -11,6 +11,19 @@
# LATEX2HTML_CONVERTER: path to the LaTeX2Html converter
#
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF (WIN32)
# Try to find the MikTex binary path (look for its package manager).
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake
index c5efc72..fc4c23d 100644
--- a/Modules/FindLibXml2.cmake
+++ b/Modules/FindLibXml2.cmake
@@ -7,11 +7,19 @@
# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
# in cache already
diff --git a/Modules/FindLibXslt.cmake b/Modules/FindLibXslt.cmake
index 95c6819..5c3953a 100644
--- a/Modules/FindLibXslt.cmake
+++ b/Modules/FindLibXslt.cmake
@@ -6,11 +6,19 @@
# LIBXSLT_LIBRARIES - Link these to LibXslt
# LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
IF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES)
# in cache already
diff --git a/Modules/FindLua50.cmake b/Modules/FindLua50.cmake
index 6d952c4..04f8b28 100644
--- a/Modules/FindLua50.cmake
+++ b/Modules/FindLua50.cmake
@@ -11,6 +11,18 @@
# This is because, the lua location is not standardized and may exist
# in locations other than lua/
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
FIND_PATH(LUA_INCLUDE_DIR lua.h
HINTS
diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake
index 2be4a01..473138d 100644
--- a/Modules/FindLua51.cmake
+++ b/Modules/FindLua51.cmake
@@ -11,6 +11,18 @@
# This is because, the lua location is not standardized and may exist
# in locations other than lua/
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
FIND_PATH(LUA_INCLUDE_DIR lua.h
HINTS
diff --git a/Modules/FindMFC.cmake b/Modules/FindMFC.cmake
index ada2205..6a3a4b7 100644
--- a/Modules/FindMFC.cmake
+++ b/Modules/FindMFC.cmake
@@ -4,6 +4,19 @@
# MFC_FOUND - Was MFC support found
# You don't need to include anything or link anything to use it.
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Assume no MFC support
SET(MFC_FOUND "NO")
diff --git a/Modules/FindMPEG.cmake b/Modules/FindMPEG.cmake
index 7b0760a..a19f73e 100644
--- a/Modules/FindMPEG.cmake
+++ b/Modules/FindMPEG.cmake
@@ -7,6 +7,19 @@
# MPEG_mpeg2_LIBRARY, where to find the MPEG library.
# MPEG_vo_LIBRARY, where to find the vo library.
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PATH(MPEG_INCLUDE_DIR mpeg2dec/include/video_out.h
/usr/local/livid
)
diff --git a/Modules/FindMPEG2.cmake b/Modules/FindMPEG2.cmake
index a2477f2..7fa7d51 100644
--- a/Modules/FindMPEG2.cmake
+++ b/Modules/FindMPEG2.cmake
@@ -7,6 +7,19 @@
# MPEG2_mpeg2_LIBRARY, where to find the MPEG2 library.
# MPEG2_vo_LIBRARY, where to find the vo library.
+#=============================================================================
+# Copyright 2003-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PATH(MPEG2_INCLUDE_DIR
NAMES mpeg2.h mpeg2dec/mpeg2.h
PATHS /usr/local/livid
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index d846854..d5014dd 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -52,6 +52,19 @@
# EXECUTABLE is the MPI program, and ARGS are the arguments to pass to the
# MPI program.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Try to find the MPI driver program
find_program(MPI_COMPILER
NAMES mpic++ mpicxx mpiCC mpicc
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 37619c2..13b961a 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -6,6 +6,18 @@
# MATLAB_MX_LIBRARY: path to libmx.lib
# MATLAB_ENG_LIBRARY: path to libeng.lib
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
SET(MATLAB_FOUND 0)
IF(WIN32)
diff --git a/Modules/FindMotif.cmake b/Modules/FindMotif.cmake
index ad471b3..c8715fd 100644
--- a/Modules/FindMotif.cmake
+++ b/Modules/FindMotif.cmake
@@ -4,6 +4,19 @@
# MOTIF_INCLUDE_DIR - include paths to use Motif
# MOTIF_LIBRARIES - Link these to use Motif
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
SET(MOTIF_FOUND 0)
IF(UNIX)
diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake
index d9cb7c1..b9b7078 100644
--- a/Modules/FindOpenAL.cmake
+++ b/Modules/FindOpenAL.cmake
@@ -10,6 +10,19 @@
#
# Created by Eric Wing. This was influenced by the FindSDL.cmake module.
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This makes the presumption that you are include al.h like
# #include "al.h"
# and not
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 4d7231d..833d7eb 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -15,6 +15,19 @@
# People will have to change the cache values of OPENGL_glu_LIBRARY
# and OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF (WIN32)
IF (CYGWIN)
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index 848f57f..5ea329d 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -10,13 +10,19 @@
#
# Supported compilers can be found at http://openmp.org/wp/openmp-compilers/
-
-# Copyright 2008, 2009 <André Rigland Brodtkorb> Andre.Brodtkorb@ifi.uio.no
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2008-2009 André Rigland Brodtkorb <Andre.Brodtkorb@ifi.uio.no>
#
-# Redistribution AND use is allowed according to the terms of the New
-# BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index bc62286..0cb611f 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -5,11 +5,19 @@
# OPENSSL_INCLUDE_DIR - the OpenSSL include directory
# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
IF(OPENSSL_LIBRARIES)
SET(OpenSSL_FIND_QUIETLY TRUE)
diff --git a/Modules/FindOpenSceneGraph.cmake b/Modules/FindOpenSceneGraph.cmake
index afa4bfb..9a13ea2 100644
--- a/Modules/FindOpenSceneGraph.cmake
+++ b/Modules/FindOpenSceneGraph.cmake
@@ -47,19 +47,26 @@
# target_link_libraries(foo ${OPENSCENEGRAPH_LIBRARIES})
#
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2009 Philip Lowman <philip@yhbt.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
#
# Naming convention:
# Local variables of the form _osg_foo
# Input variables of the form OpenSceneGraph_FOO
# Output variables of the form OPENSCENEGRAPH_FOO
#
-# Copyright (c) 2009, Philip Lowman <philip@yhbt.com>
-#
-# Redistribution AND use is allowed according to the terms of the New
-# BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
-#==================================
include(Findosg_functions)
diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake
index 3fe44b5..be53953 100644
--- a/Modules/FindOpenThreads.cmake
+++ b/Modules/FindOpenThreads.cmake
@@ -17,6 +17,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <OpenThreads/Thread>
diff --git a/Modules/FindPHP4.cmake b/Modules/FindPHP4.cmake
index 185d628..4afce99 100644
--- a/Modules/FindPHP4.cmake
+++ b/Modules/FindPHP4.cmake
@@ -7,6 +7,19 @@
# PHP4_EXECUTABLE = full path to the php4 binary
#
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
SET(PHP4_POSSIBLE_INCLUDE_PATHS
/usr/include/php4
/usr/local/include/php4
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index 3c32316..8df3573 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -10,6 +10,18 @@
# None of the above will be defined unles zlib can be found.
# PNG depends on Zlib
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
if(PNG_FIND_QUIETLY)
set(_FIND_ZLIB_ARG QUIET)
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index 47cf017..e17105c 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -17,6 +17,19 @@
# be "Could NOT find LibXml2", if you don't like this message you can specify
# your own custom failure message there.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(FindPackageMessage)
FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
diff --git a/Modules/FindPackageMessage.cmake b/Modules/FindPackageMessage.cmake
index 1106e0e..aa1bbd9 100644
--- a/Modules/FindPackageMessage.cmake
+++ b/Modules/FindPackageMessage.cmake
@@ -18,6 +18,19 @@
# ...
# ENDIF(X11_FOUND)
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FUNCTION(FIND_PACKAGE_MESSAGE pkg msg details)
# Avoid printing a message repeatedly for the same find result.
IF(NOT ${pkg}_FIND_QUIETLY)
diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake
index b3c5e4f..bf982b2 100644
--- a/Modules/FindPerl.cmake
+++ b/Modules/FindPerl.cmake
@@ -4,6 +4,19 @@
# PERL_EXECUTABLE - the full path to perl
# PERL_FOUND - If false, don't attempt to use perl.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(FindCygwin)
SET(PERL_POSSIBLE_BIN_PATHS
diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake
index 4662d57..422282f 100644
--- a/Modules/FindPerlLibs.cmake
+++ b/Modules/FindPerlLibs.cmake
@@ -20,6 +20,19 @@
# PERL_EXTRA_C_FLAGS = Compilation flags used to build perl
#
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# find the perl executable
include(FindPerl)
diff --git a/Modules/FindPhysFS.cmake b/Modules/FindPhysFS.cmake
index 443ce38..4775a8e 100644
--- a/Modules/FindPhysFS.cmake
+++ b/Modules/FindPhysFS.cmake
@@ -10,6 +10,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
HINTS
$ENV{PHYSFSDIR}
diff --git a/Modules/FindPike.cmake b/Modules/FindPike.cmake
index 12985e8..d1b5ea6 100644
--- a/Modules/FindPike.cmake
+++ b/Modules/FindPike.cmake
@@ -7,6 +7,19 @@
# PIKE_EXECUTABLE = full path to the pike binary
#
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FILE(GLOB PIKE_POSSIBLE_INCLUDE_PATHS
/usr/include/pike/*
/usr/local/include/pike/*)
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index ea72491..f7d43c9 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -67,6 +67,18 @@
#
# pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2)
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
#
diff --git a/Modules/FindProducer.cmake b/Modules/FindProducer.cmake
index d8151ef..3525509 100644
--- a/Modules/FindProducer.cmake
+++ b/Modules/FindProducer.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <Producer/CameraGroup>
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index 2f8aa5d..2134477 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -35,11 +35,21 @@
#
#====================================================================
-# Esben Mose Hansen <[EMAIL PROTECTED]>, (c) Ange Optimization ApS 2008
-# Adapted by Philip Lowman <philip@yhbt.com> (c) 2009
+
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2009 Philip Lowman <philip@yhbt.com>
+# Copyright 2008 Esben Mose Hansen, Ange Optimization ApS
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
function(PROTOBUF_GENERATE_CPP SRCS HDRS)
if(NOT ARGN)
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index 82ebd98..167f533 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -6,6 +6,19 @@
# PYTHON_EXECUTABLE - path to the Python interpreter
#
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PROGRAM(PYTHON_EXECUTABLE
NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
PATHS
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index d17d484..2b1241e 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -10,6 +10,19 @@
# PYTHON_DEBUG_LIBRARIES - path to the debug library
#
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(CMakeFindFrameworks)
# Search for the python framework on Apple.
CMAKE_FIND_FRAMEWORKS(Python)
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake
index 63b6de9..85213e8 100644
--- a/Modules/FindQt.cmake
+++ b/Modules/FindQt.cmake
@@ -17,6 +17,18 @@
# QT4_INSTALLED is set to TRUE if qt4 is found.
# QT3_INSTALLED is set to TRUE if qt3 is found.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# look for signs of qt3 installations
FILE(GLOB GLOB_TEMP_VAR /usr/lib/qt-3*/bin/qmake)
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index dcfaad3..46c337f 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -20,6 +20,19 @@
# QT_WRAP_CPP, set true if QT_MOC_EXECUTABLE is found
# QT_WRAP_UI set true if QT_UIC_EXECUTABLE is found
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# If Qt4 has already been found, fail.
IF(QT4_FOUND)
IF(Qt3_FIND_REQUIRED)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index e0e0d7e..8fb95ee 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -270,6 +270,18 @@
# (They make no sense in Qt4)
# QT_QT_LIBRARY Qt-Library is now split
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# Use FIND_PACKAGE( Qt4 COMPONENTS ... ) to enable modules
IF( Qt4_FIND_COMPONENTS )
diff --git a/Modules/FindQuickTime.cmake b/Modules/FindQuickTime.cmake
index 5a4a580..aa13ae9 100644
--- a/Modules/FindQuickTime.cmake
+++ b/Modules/FindQuickTime.cmake
@@ -9,6 +9,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# QuickTime on OS X looks different than QuickTime for Windows,
# so I am going to case the two.
diff --git a/Modules/FindRTI.cmake b/Modules/FindRTI.cmake
index 722e1e1..aa4d5f6 100644
--- a/Modules/FindRTI.cmake
+++ b/Modules/FindRTI.cmake
@@ -15,6 +15,20 @@
#
# Report problems to <certi-devel@nongnu.org>
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+# Copyright 2008 Petr Gotthard <gotthard@honeywell.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(RTI_MESSAGE_QUIETLY QUIET TYPE MSG)
IF(NOT ${QUIET})
MESSAGE(${TYPE} "${MSG}")
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index 5246bdf..cf7710e 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -8,13 +8,24 @@
# RUBY_EXECUTABLE = full path to the ruby binary
# RUBY_INCLUDE_DIRS = include dirs to be used when using the ruby library
# RUBY_LIBRARY = full path to the ruby library
+# RUBY_VERSION = the version of ruby which was found, e.g. "1.8.7"
# RUBY_FOUND = set to true if ruby ws found successfully
#
# RUBY_INCLUDE_PATH = same as RUBY_INCLUDE_DIRS, only provided for compatibility reasons, don't use it
-# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
-# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
-
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2008-2009 Alexander Neundorf <neundorf@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
# RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake
index 635a02e..cc07116 100644
--- a/Modules/FindSDL.cmake
+++ b/Modules/FindSDL.cmake
@@ -52,6 +52,19 @@
# is #include "SDL.h", not <SDL/SDL.h>. This is done for portability
# reasons because not all systems place things in SDL/ (see FreeBSD).
+#=============================================================================
+# Copyright 2003-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PATH(SDL_INCLUDE_DIR SDL.h
HINTS
$ENV{SDLDIR}
diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake
index e2481e1..c853971 100644
--- a/Modules/FindSDL_image.cmake
+++ b/Modules/FindSDL_image.cmake
@@ -12,6 +12,19 @@
# module, but with modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PATH(SDLIMAGE_INCLUDE_DIR SDL_image.h
HINTS
$ENV{SDLIMAGEDIR}
diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake
index 720a17a..a5e213f 100644
--- a/Modules/FindSDL_mixer.cmake
+++ b/Modules/FindSDL_mixer.cmake
@@ -12,6 +12,19 @@
# module, but with modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PATH(SDLMIXER_INCLUDE_DIR SDL_mixer.h
HINTS
$ENV{SDLMIXERDIR}
diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake
index 6de1946..169c8a5 100644
--- a/Modules/FindSDL_net.cmake
+++ b/Modules/FindSDL_net.cmake
@@ -12,6 +12,18 @@
# module, but with modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
FIND_PATH(SDLNET_INCLUDE_DIR SDL_net.h
HINTS
diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake
index 21d6b1c..20d8f4f 100644
--- a/Modules/FindSDL_sound.cmake
+++ b/Modules/FindSDL_sound.cmake
@@ -56,6 +56,18 @@
# CMAKE_INCLUDE_PATH to modify the search paths.
#
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
SET(SDL_SOUND_EXTRAS "" CACHE STRING "SDL_sound extra flags")
MARK_AS_ADVANCED(SDL_SOUND_EXTRAS)
diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake
index 20d3e5a..213b835 100644
--- a/Modules/FindSDL_ttf.cmake
+++ b/Modules/FindSDL_ttf.cmake
@@ -12,6 +12,19 @@
# module, but with modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PATH(SDLTTF_INCLUDE_DIR SDL_ttf.h
HINTS
$ENV{SDLTTFDIR}
diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake
index e31aab5..05c09b4 100644
--- a/Modules/FindSWIG.cmake
+++ b/Modules/FindSWIG.cmake
@@ -10,6 +10,19 @@
# means of setting SWIG_EXECUTABLE
#
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
SET(SWIG_FOUND FALSE)
FIND_PROGRAM(SWIG_EXECUTABLE swig)
diff --git a/Modules/FindSelfPackers.cmake b/Modules/FindSelfPackers.cmake
index 78d6e19..9fab6b9 100644
--- a/Modules/FindSelfPackers.cmake
+++ b/Modules/FindSelfPackers.cmake
@@ -5,6 +5,19 @@
# Examples:
# UPX: http://wildsau.idv.uni-linz.ac.at/mfx/upx.html
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(FindCygwin)
FIND_PROGRAM(SELF_PACKER_FOR_EXECUTABLE
diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake
index d51a04b..3b0eb2f 100644
--- a/Modules/FindSquish.cmake
+++ b/Modules/FindSquish.cmake
@@ -26,6 +26,19 @@
# ENDIF (SQUISH_FOUND)
#
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
SET(SQUISH_INSTALL_DIR_STRING "Directory containing the bin, doc, and lib directories for Squish; this should be the root of the installation directory.")
SET(SQUISH_SERVER_EXECUTABLE_STRING "The squishserver executable program.")
SET(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.")
diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake
index 00c4251..c33df1d 100644
--- a/Modules/FindSubversion.cmake
+++ b/Modules/FindSubversion.cmake
@@ -24,32 +24,19 @@
# MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
# ENDIF(Subversion_FOUND)
-# Copyright (c) 2006, Tristan Carel
-# All rights reserved.
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Tristan Carel
#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the University of California, Berkeley nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# $Id$
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
SET(Subversion_FOUND FALSE)
SET(Subversion_SVN_FOUND FALSE)
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index 568ab0e..67a3f9a 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -31,6 +31,19 @@
# this point it is safer you ask directly where the *source* tree is
# and dig from there.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(CMakeFindFrameworks)
INCLUDE(FindTclsh)
INCLUDE(FindWish)
diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake
index 2868bb9..8711634 100644
--- a/Modules/FindTIFF.cmake
+++ b/Modules/FindTIFF.cmake
@@ -7,6 +7,19 @@
# also defined, but not for general use are
# TIFF_LIBRARY, where to find the TIFF library.
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
FIND_PATH(TIFF_INCLUDE_DIR tiff.h)
SET(TIFF_NAMES ${TIFF_NAMES} tiff libtiff libtiff3)
diff --git a/Modules/FindTclStub.cmake b/Modules/FindTclStub.cmake
index 196d57b..896d4b1 100644
--- a/Modules/FindTclStub.cmake
+++ b/Modules/FindTclStub.cmake
@@ -21,6 +21,19 @@
# Let's leave that choice to the user by allowing him to assign
# TCL_STUB_LIBRARY to any Tcl library, debug or not.
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(FindTCL)
GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake
index 129c11a..ff0d0a5 100644
--- a/Modules/FindTclsh.cmake
+++ b/Modules/FindTclsh.cmake
@@ -7,6 +7,19 @@
# In cygwin, look for the cygwin version first. Don't look for it later to
# avoid finding the cygwin version on a Win32 build.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(WIN32 AND UNIX)
FIND_PROGRAM(TCL_TCLSH NAMES cygtclsh83 cygtclsh80)
ENDIF(WIN32 AND UNIX)
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index de3cdee..459129b 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -6,6 +6,19 @@
# CMAKE_USE_PTHREADS_INIT - are we using pthreads
# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE (CheckIncludeFiles)
INCLUDE (CheckLibraryExists)
SET(Threads_FOUND FALSE)
diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake
index 10a0bd8..c1d2c45 100644
--- a/Modules/FindUnixCommands.cmake
+++ b/Modules/FindUnixCommands.cmake
@@ -2,6 +2,19 @@
# This module looks for some usual Unix commands.
#
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(FindCygwin)
FIND_PROGRAM(BASH
diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake
index 57da7a0..fce10bc 100644
--- a/Modules/FindVTK.cmake
+++ b/Modules/FindVTK.cmake
@@ -27,6 +27,19 @@
# instead.
#
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Construct consitent error messages for use below.
SET(VTK_DIR_DESCRIPTION "directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation. For VTK 4.0, this is the location of UseVTK.cmake. This is either the root of the build tree or PREFIX/include/vtk for an installation.")
SET(VTK_DIR_MESSAGE "VTK not found. Set the VTK_DIR cmake cache entry to the ${VTK_DIR_DESCRIPTION}")
diff --git a/Modules/FindWget.cmake b/Modules/FindWget.cmake
index ff41347..c898b89 100644
--- a/Modules/FindWget.cmake
+++ b/Modules/FindWget.cmake
@@ -4,6 +4,19 @@
# WGET_EXECUTABLE: the full path to the wget tool.
# WGET_FOUND: True if wget has been found.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(FindCygwin)
FIND_PROGRAM(WGET_EXECUTABLE
diff --git a/Modules/FindWish.cmake b/Modules/FindWish.cmake
index 0afd3c9..c086da5 100644
--- a/Modules/FindWish.cmake
+++ b/Modules/FindWish.cmake
@@ -6,6 +6,20 @@
# TK_WISH = the path to the wish executable
#
# if UNIX is defined, then it will look for the cygwin version first
+
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(UNIX)
FIND_PROGRAM(TK_WISH cygwish80 )
ENDIF(UNIX)
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index 3155aac..531c026 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -34,8 +34,18 @@
# X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND
# X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND
-# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
-# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
IF (UNIX)
SET(X11_FOUND 0)
diff --git a/Modules/FindXMLRPC.cmake b/Modules/FindXMLRPC.cmake
index 2eefd2f..48f87d7 100644
--- a/Modules/FindXMLRPC.cmake
+++ b/Modules/FindXMLRPC.cmake
@@ -12,6 +12,19 @@
# Typical usage:
# FIND_PACKAGE(XMLRPC REQUIRED libwww-client)
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# First find the config script from which to obtain other values.
FIND_PROGRAM(XMLRPC_C_CONFIG NAMES xmlrpc-c-config)
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 23ea937..dc80ed8 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -5,6 +5,18 @@
# ZLIB_LIBRARIES - List of libraries when using zlib.
# ZLIB_FOUND - True if zlib found.
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
IF (ZLIB_INCLUDE_DIR)
# Already in cache, be silent
diff --git a/Modules/Findosg.cmake b/Modules/Findosg.cmake
index f4ec42e..00e4711 100644
--- a/Modules/Findosg.cmake
+++ b/Modules/Findosg.cmake
@@ -29,6 +29,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgUtil/SceneView>
diff --git a/Modules/FindosgAnimation.cmake b/Modules/FindosgAnimation.cmake
index ed31232..a4bbb44 100644
--- a/Modules/FindosgAnimation.cmake
+++ b/Modules/FindosgAnimation.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgAnimation/Animation>
diff --git a/Modules/FindosgDB.cmake b/Modules/FindosgDB.cmake
index 9a19210..d0d75b6 100644
--- a/Modules/FindosgDB.cmake
+++ b/Modules/FindosgDB.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgDB/DatabasePager>
diff --git a/Modules/FindosgFX.cmake b/Modules/FindosgFX.cmake
index 43d5bd2..cf1a98b 100644
--- a/Modules/FindosgFX.cmake
+++ b/Modules/FindosgFX.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgFX/BumpMapping>
diff --git a/Modules/FindosgGA.cmake b/Modules/FindosgGA.cmake
index 9dfa13b..ca7e55a 100644
--- a/Modules/FindosgGA.cmake
+++ b/Modules/FindosgGA.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgGA/FlightManipulator>
diff --git a/Modules/FindosgIntrospection.cmake b/Modules/FindosgIntrospection.cmake
index af17687..3045cd5 100644
--- a/Modules/FindosgIntrospection.cmake
+++ b/Modules/FindosgIntrospection.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgIntrospection/Reflection>
diff --git a/Modules/FindosgManipulator.cmake b/Modules/FindosgManipulator.cmake
index ca0b6b8..6de812e 100644
--- a/Modules/FindosgManipulator.cmake
+++ b/Modules/FindosgManipulator.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgManipulator/TrackballDragger>
diff --git a/Modules/FindosgParticle.cmake b/Modules/FindosgParticle.cmake
index 5a5b316..d693d04 100644
--- a/Modules/FindosgParticle.cmake
+++ b/Modules/FindosgParticle.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgParticle/FireEffect>
diff --git a/Modules/FindosgProducer.cmake b/Modules/FindosgProducer.cmake
index 19e00ed..2810d86 100644
--- a/Modules/FindosgProducer.cmake
+++ b/Modules/FindosgProducer.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgProducer/OsgSceneHandler>
diff --git a/Modules/FindosgShadow.cmake b/Modules/FindosgShadow.cmake
index 665aa5e..60f29ff 100644
--- a/Modules/FindosgShadow.cmake
+++ b/Modules/FindosgShadow.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgShadow/ShadowTexture>
diff --git a/Modules/FindosgSim.cmake b/Modules/FindosgSim.cmake
index eec2166..8f28d55 100644
--- a/Modules/FindosgSim.cmake
+++ b/Modules/FindosgSim.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgSim/ImpostorSprite>
diff --git a/Modules/FindosgTerrain.cmake b/Modules/FindosgTerrain.cmake
index fbd732a..4fcd4bd 100644
--- a/Modules/FindosgTerrain.cmake
+++ b/Modules/FindosgTerrain.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgTerrain/Terrain>
diff --git a/Modules/FindosgText.cmake b/Modules/FindosgText.cmake
index b98ed22..0c6c606 100644
--- a/Modules/FindosgText.cmake
+++ b/Modules/FindosgText.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgText/Text>
diff --git a/Modules/FindosgUtil.cmake b/Modules/FindosgUtil.cmake
index e88c5d8..f314d23 100644
--- a/Modules/FindosgUtil.cmake
+++ b/Modules/FindosgUtil.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgUtil/SceneView>
diff --git a/Modules/FindosgViewer.cmake b/Modules/FindosgViewer.cmake
index e1370a0..35be2f5 100644
--- a/Modules/FindosgViewer.cmake
+++ b/Modules/FindosgViewer.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgViewer/Viewer>
diff --git a/Modules/FindosgVolume.cmake b/Modules/FindosgVolume.cmake
index 52e51bd..f89bbdd 100644
--- a/Modules/FindosgVolume.cmake
+++ b/Modules/FindosgVolume.cmake
@@ -25,6 +25,19 @@
#
# Created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgVolume/Volume>
diff --git a/Modules/FindosgWidget.cmake b/Modules/FindosgWidget.cmake
index 5f43420..45ad1a6 100644
--- a/Modules/FindosgWidget.cmake
+++ b/Modules/FindosgWidget.cmake
@@ -25,6 +25,19 @@
#
# FindosgWidget.cmake tweaked from Findosg* suite as created by Eric Wing.
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgWidget/Widget>
diff --git a/Modules/Findosg_functions.cmake b/Modules/Findosg_functions.cmake
index 128be37..bc6f2de 100644
--- a/Modules/Findosg_functions.cmake
+++ b/Modules/Findosg_functions.cmake
@@ -3,6 +3,20 @@
# libraries and nodekits.
#
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2009 Philip Lowman <philip@yhbt.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
#
# OSG_FIND_PATH
#
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index b070048..478282b 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -63,6 +63,20 @@
# # and for each of your dependant executable/library targets:
# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2007-2009 Miguel A. Figueroa-Villanueva <miguelf at ieee dot org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
#
# FIXME: check this and provide a correct sample usage...
# Remember to connect back to the upper text.
@@ -71,7 +85,6 @@
# FIND_PACKAGE(wxWidgets COMPONENTS mono)
# ...
-
# NOTES
#
# This module has been tested on the WIN32 platform with wxWidgets
diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake
index 4614e22..4cb4c9e 100644
--- a/Modules/FindwxWindows.cmake
+++ b/Modules/FindwxWindows.cmake
@@ -47,6 +47,19 @@
# AUTHOR
# Jan Woetzel <http://www.mip.informatik.uni-kiel.de/~jw> (07/2003-01/2006)
+#=============================================================================
+# Copyright 2000-2009 Kitware, Inc.
+# Copyright 2003-2006 Jan Woetzel
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# ------------------------------------------------------------------
#
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index 10685b2..7a360de 100644
--- a/Modules/FortranCInterface.cmake
+++ b/Modules/FortranCInterface.cmake
@@ -81,6 +81,19 @@
# (The carets point at raw symbol names for clarity in this example
# but are not needed.)
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
#-----------------------------------------------------------------------------
# Execute at most once in a project.
if(FortranCInterface_SOURCE_DIR)
diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt
index a0323de..8402940 100644
--- a/Modules/FortranCInterface/CMakeLists.txt
+++ b/Modules/FortranCInterface/CMakeLists.txt
@@ -1,3 +1,14 @@
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
cmake_minimum_required(VERSION 2.6.3)
project(FortranCInterface C Fortran)
include(${FortranCInterface_BINARY_DIR}/Input.cmake OPTIONAL)
diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake
index abc012e..70dbe27 100644
--- a/Modules/FortranCInterface/Detect.cmake
+++ b/Modules/FortranCInterface/Detect.cmake
@@ -1,3 +1,14 @@
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
configure_file(${FortranCInterface_SOURCE_DIR}/Input.cmake.in
${FortranCInterface_BINARY_DIR}/Input.cmake @ONLY)
diff --git a/Modules/FortranCInterface/Verify/CMakeLists.txt b/Modules/FortranCInterface/Verify/CMakeLists.txt
index 7d75991..052dd59 100644
--- a/Modules/FortranCInterface/Verify/CMakeLists.txt
+++ b/Modules/FortranCInterface/Verify/CMakeLists.txt
@@ -1,3 +1,14 @@
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
cmake_minimum_required(VERSION 2.7)
project(VerifyFortranC C Fortran)
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index a357f00..67d4a14 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -24,6 +24,18 @@
# Requires CMake 2.6 or greater because it uses function, break, return and
# PARENT_SCOPE.
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# gp_append_unique list_var value
#
@@ -61,16 +73,16 @@ function(is_file_executable file result_var)
get_filename_component(file_full "${file}" ABSOLUTE)
string(TOLOWER "${file_full}" file_full_lower)
- # If file name ends in .exe or .dll on Windows, *assume* executable:
+ # If file name ends in .exe on Windows, *assume* executable:
#
if(WIN32)
- if("${file_full_lower}" MATCHES "\\.(exe|dll)$")
+ if("${file_full_lower}" MATCHES "\\.exe$")
set(${result_var} 1 PARENT_SCOPE)
return()
- endif("${file_full_lower}" MATCHES "\\.(exe|dll)$")
+ endif("${file_full_lower}" MATCHES "\\.exe$")
# A clause could be added here that uses output or return value of dumpbin
- # to determine ${result_var}. In 99%+? practical cases, the exe|dll name
+ # to determine ${result_var}. In 99%+? practical cases, the exe name
# match will be sufficient...
#
endif(WIN32)
diff --git a/Modules/ITKCompatibility.cmake b/Modules/ITKCompatibility.cmake
index 8a13925..3693abc 100644
--- a/Modules/ITKCompatibility.cmake
+++ b/Modules/ITKCompatibility.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# work around an old bug in ITK prior to verison 3.0
SET(TIFF_RIGHT_VERSION 1)
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 057924c..6f24cd6 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -12,6 +12,19 @@
# If CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time
# libraries are installed as well as the CRT run time libraries.
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(MSVC)
FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
diff --git a/Modules/KDE3Macros.cmake b/Modules/KDE3Macros.cmake
index 86cfd57..f358cd7 100644
--- a/Modules/KDE3Macros.cmake
+++ b/Modules/KDE3Macros.cmake
@@ -1,5 +1,19 @@
#
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# See FindKDE3.cmake for documentation.
#
# this file contains the following macros:
diff --git a/Modules/MacroAddFileDependencies.cmake b/Modules/MacroAddFileDependencies.cmake
index cca2840..e4a82d1 100644
--- a/Modules/MacroAddFileDependencies.cmake
+++ b/Modules/MacroAddFileDependencies.cmake
@@ -6,6 +6,18 @@
# wrapper around the OBJECT_DEPENDS source file property. You can just
# use SET_PROPERTY(SOURCE <file> APPEND PROPERTY OBJECT_DEPENDS depend_files) instead.
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
MACRO (MACRO_ADD_FILE_DEPENDENCIES _file)
diff --git a/Modules/Platform/AIX-VisualAge-C.cmake b/Modules/Platform/AIX-VisualAge-C.cmake
new file mode 100644
index 0000000..67b3171
--- /dev/null
+++ b/Modules/Platform/AIX-VisualAge-C.cmake
@@ -0,0 +1 @@
+include(Platform/AIX-XL-C)
diff --git a/Modules/Platform/AIX-VisualAge-CXX.cmake b/Modules/Platform/AIX-VisualAge-CXX.cmake
new file mode 100644
index 0000000..7894d24
--- /dev/null
+++ b/Modules/Platform/AIX-VisualAge-CXX.cmake
@@ -0,0 +1 @@
+include(Platform/AIX-XL-CXX)
diff --git a/Modules/Platform/AIX-XL-C.cmake b/Modules/Platform/AIX-XL-C.cmake
new file mode 100644
index 0000000..2de30d5
--- /dev/null
+++ b/Modules/Platform/AIX-XL-C.cmake
@@ -0,0 +1,4 @@
+SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
+SET(CMAKE_SHARED_LIBRARY_C_FLAGS " ")
+SET(CMAKE_SHARED_MODULE_C_FLAGS " ")
diff --git a/Modules/Platform/AIX-XL-CXX.cmake b/Modules/Platform/AIX-XL-CXX.cmake
new file mode 100644
index 0000000..648cb31
--- /dev/null
+++ b/Modules/Platform/AIX-XL-CXX.cmake
@@ -0,0 +1,4 @@
+SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
+SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
+SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS " ")
+SET(CMAKE_SHARED_MODULE_CXX_FLAGS " ")
diff --git a/Modules/Platform/AIX-XL-Fortran.cmake b/Modules/Platform/AIX-XL-Fortran.cmake
new file mode 100644
index 0000000..8292e78
--- /dev/null
+++ b/Modules/Platform/AIX-XL-Fortran.cmake
@@ -0,0 +1,4 @@
+SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
+SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
+SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS " ")
+SET(CMAKE_SHARED_MODULE_Fortran_FLAGS " ")
diff --git a/Modules/Platform/AIX.cmake b/Modules/Platform/AIX.cmake
index 455586d..c8a33c3 100644
--- a/Modules/Platform/AIX.cmake
+++ b/Modules/Platform/AIX.cmake
@@ -18,44 +18,13 @@ SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
# CXX Compiler
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-G") # -shared
-ELSE(CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
- SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
- SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS " ")
- SET(CMAKE_SHARED_MODULE_CXX_FLAGS " ")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
# C Compiler
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-G") # -shared
-ELSE(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G -Wl,-brtl,-bnoipath") # -shared
- SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS " ")
- SET(CMAKE_SHARED_MODULE_C_FLAGS " ")
- SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
- SET (CMAKE_C_FLAGS_RELEASE_INIT "-O -DNDEBUG")
- SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
-IF(NOT CMAKE_COMPILER_IS_GNUCC)
- SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)
-
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_CXX_COMPILE_OBJECT
- "<CMAKE_CXX_COMPILER> -+ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
- SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
-
-
# since .a can be a static or shared library on AIX, we can not do this.
# at some point if we wanted it, we would have to figure out if a .a is
# static or shared, then we could add this back:
diff --git a/Modules/Platform/Darwin-VisualAge-C.cmake b/Modules/Platform/Darwin-VisualAge-C.cmake
new file mode 100644
index 0000000..859914f
--- /dev/null
+++ b/Modules/Platform/Darwin-VisualAge-C.cmake
@@ -0,0 +1 @@
+include(Platform/Darwin-XL-C)
diff --git a/Modules/Platform/Darwin-VisualAge-CXX.cmake b/Modules/Platform/Darwin-VisualAge-CXX.cmake
new file mode 100644
index 0000000..46c1005
--- /dev/null
+++ b/Modules/Platform/Darwin-VisualAge-CXX.cmake
@@ -0,0 +1 @@
+include(Platform/Darwin-XL-CXX)
diff --git a/Modules/Platform/Darwin-xlc.cmake b/Modules/Platform/Darwin-XL-C.cmake
index f7e4da3..934ebcc 100644
--- a/Modules/Platform/Darwin-xlc.cmake
+++ b/Modules/Platform/Darwin-XL-C.cmake
@@ -3,4 +3,3 @@ SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
# Enable shared library versioning.
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-install_name")
-SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")
diff --git a/Modules/Platform/Darwin-XL-CXX.cmake b/Modules/Platform/Darwin-XL-CXX.cmake
new file mode 100644
index 0000000..22ae018
--- /dev/null
+++ b/Modules/Platform/Darwin-XL-CXX.cmake
@@ -0,0 +1,5 @@
+SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-qmkshrobj")
+SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-bundle")
+
+# Enable shared library versioning.
+SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")
diff --git a/Modules/Platform/Haiku.cmake b/Modules/Platform/Haiku.cmake
index 84ded80..6676f24 100644
--- a/Modules/Platform/Haiku.cmake
+++ b/Modules/Platform/Haiku.cmake
@@ -19,3 +19,8 @@ LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin)
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib)
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/develop/headers/3rdparty)
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/develop/lib/x86)
+
+IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ SET(CMAKE_INSTALL_PREFIX "/boot/common" CACHE PATH
+ "Install path prefix, prepended onto install directories." FORCE)
+ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
diff --git a/Modules/Platform/Linux-XL-C.cmake b/Modules/Platform/Linux-XL-C.cmake
index 08370e2..efcdf87 100644
--- a/Modules/Platform/Linux-XL-C.cmake
+++ b/Modules/Platform/Linux-XL-C.cmake
@@ -1,2 +1,3 @@
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
diff --git a/Modules/Platform/Linux-XL-CXX.cmake b/Modules/Platform/Linux-XL-CXX.cmake
index 2ba2ce8..b1b6d85 100644
--- a/Modules/Platform/Linux-XL-CXX.cmake
+++ b/Modules/Platform/Linux-XL-CXX.cmake
@@ -2,4 +2,4 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
+SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-qmkshrobj")
diff --git a/Modules/Platform/Linux-XL-Fortran.cmake b/Modules/Platform/Linux-XL-Fortran.cmake
index 08370e2..3ebb89d 100644
--- a/Modules/Platform/Linux-XL-Fortran.cmake
+++ b/Modules/Platform/Linux-XL-Fortran.cmake
@@ -1,2 +1,3 @@
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-qmkshrobj")
diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake
index 4cec40f..edba5d9 100644
--- a/Modules/SelectLibraryConfigurations.cmake
+++ b/Modules/SelectLibraryConfigurations.cmake
@@ -14,6 +14,21 @@
# or the generator in use does not support configuration types, then
# basename_LIBRARY and basename_LIBRARIES will take only the release values.
+#=============================================================================
+# Copyright 2009 Kitware, Inc.
+# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com>
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
# Dicharry <wdicharry@stellarscience.com>.
diff --git a/Modules/SquishTestScript.cmake b/Modules/SquishTestScript.cmake
index 2e0caaf..d42a84c 100644
--- a/Modules/SquishTestScript.cmake
+++ b/Modules/SquishTestScript.cmake
@@ -9,6 +9,19 @@
# raised.
#
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
# print out the variable that we are using
diff --git a/Modules/SystemInformation.cmake b/Modules/SystemInformation.cmake
index 370778c..ef9b427 100644
--- a/Modules/SystemInformation.cmake
+++ b/Modules/SystemInformation.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
PROJECT(DumpInformation)
# first get the standard information for th platform
diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake
index ffc3a0c..7514127 100644
--- a/Modules/TestBigEndian.cmake
+++ b/Modules/TestBigEndian.cmake
@@ -4,6 +4,19 @@
# VARIABLE - variable to store the result to
#
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(TEST_BIG_ENDIAN VARIABLE)
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
MESSAGE(STATUS "Check if the system is big endian")
diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake
index 2242dcf..98b2f9b 100644
--- a/Modules/TestCXXAcceptsFlag.cmake
+++ b/Modules/TestCXXAcceptsFlag.cmake
@@ -7,6 +7,19 @@
# VARIABLE - variable to store the result
#
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
MACRO(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE)
IF(NOT DEFINED ${VARIABLE})
MESSAGE(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS}")
diff --git a/Modules/TestForANSIForScope.cmake b/Modules/TestForANSIForScope.cmake
index 5d27bb4..f8089e5 100644
--- a/Modules/TestForANSIForScope.cmake
+++ b/Modules/TestForANSIForScope.cmake
@@ -3,6 +3,19 @@
# CMAKE_NO_ANSI_FOR_SCOPE - holds result
#
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")
MESSAGE(STATUS "Check for ANSI scope")
TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE ${CMAKE_BINARY_DIR}
diff --git a/Modules/TestForANSIStreamHeaders.cmake b/Modules/TestForANSIStreamHeaders.cmake
index e3d4483..2ce2a55 100644
--- a/Modules/TestForANSIStreamHeaders.cmake
+++ b/Modules/TestForANSIStreamHeaders.cmake
@@ -2,6 +2,20 @@
# check if we they have the standard ansi stream files (without the .h)
# CMAKE_NO_ANSI_STREAM_HEADERS - defined by the results
#
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
INCLUDE(CheckIncludeFileCXX)
IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
diff --git a/Modules/TestForSSTREAM.cmake b/Modules/TestForSSTREAM.cmake
index 1884bf2..959c9df 100644
--- a/Modules/TestForSSTREAM.cmake
+++ b/Modules/TestForSSTREAM.cmake
@@ -2,6 +2,20 @@
# check if the compiler supports std:: on stl classes
# CMAKE_NO_ANSI_STRING_STREAM - defined by the results
#
+
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$")
MESSAGE(STATUS "Check for sstream")
TRY_COMPILE(CMAKE_HAS_ANSI_STRING_STREAM ${CMAKE_BINARY_DIR}
diff --git a/Modules/TestForSTDNamespace.cmake b/Modules/TestForSTDNamespace.cmake
index 58d2ff3..f0966d0 100644
--- a/Modules/TestForSTDNamespace.cmake
+++ b/Modules/TestForSTDNamespace.cmake
@@ -2,6 +2,20 @@
# check if the compiler supports std:: on stl classes
# CMAKE_NO_STD_NAMESPACE - defined by the results
#
+
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
MESSAGE(STATUS "Check for STD namespace")
TRY_COMPILE(CMAKE_STD_NAMESPACE ${CMAKE_BINARY_DIR}
diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake
index 73d3f2a..9785cd5 100644
--- a/Modules/UseEcos.cmake
+++ b/Modules/UseEcos.cmake
@@ -16,6 +16,19 @@
# for internal use only:
# ECOS_ADD_TARGET_LIB
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# first check that ecosconfig is available
FIND_PROGRAM(ECOSCONFIG_EXECUTABLE NAMES ecosconfig)
IF(NOT ECOSCONFIG_EXECUTABLE)
diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake
index bddf5b4..e8194d5 100644
--- a/Modules/UsePkgConfig.cmake
+++ b/Modules/UsePkgConfig.cmake
@@ -10,7 +10,18 @@
# variable will be empty when the function returns, otherwise they will contain the respective information
#
-
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config )
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index d8b3756..f92500b 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -3,6 +3,18 @@
# has already been loaded. See FindQt.cmake for information on
# how to load Qt 4 into your CMake project.
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
ADD_DEFINITIONS(${QT_DEFINITIONS})
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
@@ -43,7 +55,7 @@ ENDIF (QT_USE_QT3SUPPORT)
SET(QT_QT3SUPPORT_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
SET(QT_QTSVG_MODULE_DEPENDS QTGUI QTXML QTCORE)
SET(QT_QTUITOOLS_MODULE_DEPENDS QTGUI QTXML QTCORE)
-SET(QT_QTHELP_MODULE_DEPENDS QTGUI QTSQL QTXML QTCORE)
+SET(QT_QTHELP_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
IF(QT_QTDBUS_FOUND)
SET(QT_PHONON_MODULE_DEPENDS QTGUI QTDBUS QTCORE)
ELSE(QT_QTDBUS_FOUND)
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 5499f84..5e0d18c 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -15,6 +15,19 @@
# The name-specific variable SWIG_MODULE_<name>_EXTRA_DEPS may be used
# to specify extra dependencies for the generated modules.
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
SET(SWIG_CXX_EXTENSION "cxx")
SET(SWIG_EXTRA_LIBRARIES "")
diff --git a/Modules/UseVTK40.cmake b/Modules/UseVTK40.cmake
index 086f6da..560039f 100644
--- a/Modules/UseVTK40.cmake
+++ b/Modules/UseVTK40.cmake
@@ -1,5 +1,18 @@
#
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This is an implementation detail for using VTK 4.0 with the
# FindVTK.cmake module. Do not include directly by name. This should
# be included only when FindVTK.cmake sets the VTK_USE_FILE variable
diff --git a/Modules/UseVTKBuildSettings40.cmake b/Modules/UseVTKBuildSettings40.cmake
index a43bb0b..693743c 100644
--- a/Modules/UseVTKBuildSettings40.cmake
+++ b/Modules/UseVTKBuildSettings40.cmake
@@ -1,5 +1,18 @@
#
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# Implementation detail for FindVTK.cmake to let it provide a
# VTK_BUILD_SETTINGS_FILE for VTK 4.0.
diff --git a/Modules/UseVTKConfig40.cmake b/Modules/UseVTKConfig40.cmake
index 623c607..2100d84 100644
--- a/Modules/UseVTKConfig40.cmake
+++ b/Modules/UseVTKConfig40.cmake
@@ -1,5 +1,18 @@
#
+#=============================================================================
+# Copyright 2002-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# This is an implementation detail for using VTK 4.0 with the
# FindVTK.cmake module. Do not include directly.
diff --git a/Modules/Use_wxWindows.cmake b/Modules/Use_wxWindows.cmake
index b6e04f4..2bae99c 100644
--- a/Modules/Use_wxWindows.cmake
+++ b/Modules/Use_wxWindows.cmake
@@ -12,7 +12,21 @@
# if you are sure you need GL then
# SET(WXWINDOWS_USE_GL 1)
# *before* you include this file.
+
+#=============================================================================
+# Copyright 2003-2009 Kitware, Inc.
+# Copyright 2003 Jan Woetzel
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
# -----------------------------------------------------
# 16.Feb.2004: changed INCLUDE to FIND_PACKAGE to read from users own non-system CMAKE_MODULE_PATH (Jan Woetzel JW)
# 07/2006: rewrite as FindwxWidgets.cmake, kept for backward compatibility JW
diff --git a/Modules/UsewxWidgets.cmake b/Modules/UsewxWidgets.cmake
index df373bf..b001f6a 100644
--- a/Modules/UsewxWidgets.cmake
+++ b/Modules/UsewxWidgets.cmake
@@ -17,6 +17,19 @@
# AUTHOR
# Jan Woetzel <jw -at- mip.informatik.uni-kiel.de>
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2006 Jan Woetzel
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# debug message and logging.
# comment these out for distribution
diff --git a/Modules/VTKCompatibility.cmake b/Modules/VTKCompatibility.cmake
index 75e2f40..c0b3d62 100644
--- a/Modules/VTKCompatibility.cmake
+++ b/Modules/VTKCompatibility.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
IF(APPLE)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY}")
SET(CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_C_CREATE_SHARED_MODULE}")
diff --git a/Modules/ecos_clean.cmake b/Modules/ecos_clean.cmake
index 57af343..b76137c 100644
--- a/Modules/ecos_clean.cmake
+++ b/Modules/ecos_clean.cmake
@@ -1,3 +1,17 @@
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
file(GLOB _files ${ECOS_DIR}/*)
# remove all directories, which consist of lower-case letters only
diff --git a/Modules/kde3uic.cmake b/Modules/kde3uic.cmake
index 0dbbbcf..b52dc09 100644
--- a/Modules/kde3uic.cmake
+++ b/Modules/kde3uic.cmake
@@ -1,4 +1,17 @@
+#=============================================================================
+# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
# used internally by KDE3Macros.cmake
# neundorf@kde.org
diff --git a/Modules/readme.txt b/Modules/readme.txt
index ccfa127..d23c4c3 100644
--- a/Modules/readme.txt
+++ b/Modules/readme.txt
@@ -1,3 +1,6 @@
+For more information about how to contribute modules to CMake, see this page:
+http://www.itk.org/Wiki/CMake:Module_Maintainers
+
Note to authors of FindXXX.cmake files
We would like all FindXXX.cmake files to produce consistent variable names.
@@ -106,3 +109,4 @@ error if the module is not found.
To get this behaviour you can use the FIND_PACKAGE_HANDLE_STANDARD_ARGS()
macro, as an example see FindJPEG.cmake.
+